Examples of BooleanColumnReference


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

        return new FieldDataType("string");
    }

    @Test
    public void testFieldCacheExpression() throws Exception {
        BooleanColumnReference booleanColumn = new BooleanColumnReference(fieldName().name());
        booleanColumn.startCollect(ctx);
        booleanColumn.setNextReader(readerContext);
        IndexSearcher searcher = new IndexSearcher(readerContext.reader());
        TopDocs topDocs = searcher.search(new MatchAllDocsQuery(), 20);
        int i = 0;
        for (ScoreDoc doc : topDocs.scoreDocs) {
            booleanColumn.setNextDocId(doc.doc);
            assertThat(booleanColumn.value(), is(i%2==0));
            i++;
        }
    }
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.