Examples of FloatColumnReference


Examples of io.crate.operation.reference.doc.lucene.FloatColumnReference

        return new FieldDataType("float");
    }

    @Test
    public void testFieldCacheExpression() throws Exception {
        FloatColumnReference floatColumn = new FloatColumnReference(fieldName().name());
        floatColumn.startCollect(ctx);
        floatColumn.setNextReader(readerContext);
        IndexSearcher searcher = new IndexSearcher(readerContext.reader());
        TopDocs topDocs = searcher.search(new MatchAllDocsQuery(), 10);
        float f = -0.5f;
        for (ScoreDoc doc : topDocs.scoreDocs) {
            floatColumn.setNextDocId(doc.doc);
            assertThat(floatColumn.value(), is(f));
            f++;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.