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

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


        return new FieldDataType("short");
    }

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

TOP

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

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.