Package io.crate.operation.reference.doc.lucene

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


        return new FieldDataType("double");
    }

    @Test
    public void testFieldCacheExpression() throws Exception {
        DoubleColumnReference doubleColumn = new DoubleColumnReference(fieldName().name());
        doubleColumn.startCollect(ctx);
        doubleColumn.setNextReader(readerContext);
        IndexSearcher searcher = new IndexSearcher(readerContext.reader());
        TopDocs topDocs = searcher.search(new MatchAllDocsQuery(), 10);
        double d = 0.5;
        for (ScoreDoc doc : topDocs.scoreDocs) {
            doubleColumn.setNextDocId(doc.doc);
            assertThat(doubleColumn.value(), is(d));
            d++;
        }
    }
View Full Code Here

TOP

Related Classes of io.crate.operation.reference.doc.lucene.DoubleColumnReference

Copyright © 2018 www.massapicom. 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.