use of org.apache.lucene.document.FloatField in project querydsl by querydsl.
the class LuceneSerializerTest method createDocument.
private Document createDocument() {
Document doc = new Document();
doc.add(new Field("title", new StringReader("Jurassic Park")));
doc.add(new Field("author", new StringReader("Michael Crichton")));
doc.add(new Field("text", new StringReader("It's a UNIX system! I know this!")));
doc.add(new Field("rating", new StringReader("Good")));
doc.add(new Field("publisher", "", Store.YES, Index.ANALYZED));
doc.add(new IntField("year", 1990, Store.YES));
doc.add(new DoubleField("gross", 900.0, Store.YES));
doc.add(new LongField("longField", 1, Store.YES));
doc.add(new IntField("shortField", 1, Store.YES));
doc.add(new IntField("byteField", 1, Store.YES));
doc.add(new FloatField("floatField", 1, Store.YES));
return doc;
}
use of org.apache.lucene.document.FloatField in project crate by crate.
the class FloatColumnReferenceTest method insertValues.
@Override
protected void insertValues(IndexWriter writer) throws Exception {
for (float f = -0.5f; f < 10.0f; f++) {
Document doc = new Document();
doc.add(new StringField("_id", Float.toString(f), Field.Store.NO));
doc.add(new FloatField(column, f, Field.Store.NO));
writer.addDocument(doc);
}
}
Aggregations