Example usage for org.apache.lucene.index DocValuesType NUMERIC

List of usage examples for org.apache.lucene.index DocValuesType NUMERIC

Introduction

In this page you can find the example usage for org.apache.lucene.index DocValuesType NUMERIC.

Prototype

DocValuesType NUMERIC

To view the source code for org.apache.lucene.index DocValuesType NUMERIC.

Click Source Link

Document

A per-document Number

Usage

From source file:com.stratio.cassandra.lucene.schema.mapping.DateMapperTest.java

License:Apache License

@Test
public void testSortedField() throws ParseException {
    long time = sdf.parse("2014-03-19").getTime();
    DateMapper mapper = new DateMapper("field", null, true, PATTERN);
    Field field = mapper.sortedField("name", time, false);
    assertNotNull(field);//  w  ww  .ja va2  s .  c o m
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.DateMapperTest.java

License:Apache License

@Test
public void testSortedFieldCollection() throws ParseException {
    long time = sdf.parse("2014-03-19").getTime();
    DateMapper mapper = new DateMapper("field", null, true, PATTERN);
    Field field = mapper.sortedField("name", time, true);
    assertNotNull(field);/*from  w w  w.  j  ava2 s . c o m*/
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.DoubleMapperTest.java

License:Apache License

@Test
public void testSortedField() {
    DoubleMapper mapper = new DoubleMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3.2d, false);
    assertNotNull(field);/*  w  ww.  j a  va 2 s .c  o m*/
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.DoubleMapperTest.java

License:Apache License

@Test
public void testSortedFieldCollection() {
    DoubleMapper mapper = new DoubleMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3.2d, true);
    assertNotNull(field);/*from   w w  w  .j a v a 2 s.  c  o m*/
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.FloatMapperTest.java

License:Apache License

@Test
public void testSortedField() {
    FloatMapper mapper = new FloatMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3.2f, false);
    assertNotNull(field);/*from w w  w .j a  va  2  s  . c  o  m*/
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.FloatMapperTest.java

License:Apache License

@Test
public void testSortedFieldCollection() {
    FloatMapper mapper = new FloatMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3.2f, true);
    assertNotNull(field);//from   w w  w.j  a v  a2 s . c  om
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.IntegerMapperTest.java

License:Apache License

@Test
public void testSortedField() {
    IntegerMapper mapper = new IntegerMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3, false);
    assertNotNull(field);/*from www .j  a  v a 2  s. c om*/
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.IntegerMapperTest.java

License:Apache License

@Test
public void testSortedFieldCollection() {
    IntegerMapper mapper = new IntegerMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3, true);
    assertNotNull(field);//from   w  w w .  j  a  v a  2 s  .  c o m
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.LongMapperTest.java

License:Apache License

@Test
public void testSortedField() {
    LongMapper mapper = new LongMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3L, false);
    assertNotNull(field);//from  w  ww .j av  a 2  s .c  o  m
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}

From source file:com.stratio.cassandra.lucene.schema.mapping.LongMapperTest.java

License:Apache License

@Test
public void testSortedFieldCollection() {
    LongMapper mapper = new LongMapper("field", true, true, 1f);
    Field field = mapper.sortedField("name", 3L, true);
    assertNotNull(field);/*  ww w. ja va2  s.c o  m*/
    assertEquals(DocValuesType.NUMERIC, field.fieldType().docValuesType());
}