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

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


        return new FieldDataType("int");
    }

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

TOP

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

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.