Examples of searchAfter()


Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

                    searcher = indexNode.acquireSearcher();
                    Query query = getQuery(filter, searcher.getIndexReader(),
                            nonFullTextConstraints, analyzer, index.getDefinition());
                    TopDocs docs;
                    if (lastDoc != null) {
                        docs = searcher.searchAfter(lastDoc, query, LUCENE_QUERY_BATCH_SIZE);
                    } else {
                        docs = searcher.search(query, LUCENE_QUERY_BATCH_SIZE);
                    }

                    for (ScoreDoc doc : docs.scoreDocs) {
View Full Code Here

Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

    }

    // Now get hits after hit #2 using IS.searchAfter()
    int afterIdx = 1;
    FieldDoc afterHit = (FieldDoc) hits.scoreDocs[afterIdx];
    hits = searcher.searchAfter(afterHit, q, Integer.MAX_VALUE, orderBy);

    // Expected # of hits: NUM_VALS - 2
    assertEquals(NUM_VALS - (afterIdx + 1), hits.scoreDocs.length);

    // Verify that hits are actually "after"
View Full Code Here

Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

    }

    // Now get hits after hit #2 using IS.searchAfter()
    int afterIdx = 1;
    FieldDoc afterHit = (FieldDoc) hits.scoreDocs[afterIdx];
    hits = searcher.searchAfter(afterHit, q, reader.maxDoc(), orderBy);

    // Expected # of hits: NUM_VALS - 2
    assertEquals(NUM_VALS - (afterIdx + 1), hits.scoreDocs.length);

    // Verify that hits are actually "after"
View Full Code Here

Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

                    IndexSearcher searcher = indexNode.getSearcher();
                    Query query = getQuery(filter, searcher.getIndexReader(),
                            nonFullTextConstraints, analyzer, indexNode.getDefinition());
                    TopDocs docs;
                    if (lastDoc != null) {
                        docs = searcher.searchAfter(lastDoc, query, LUCENE_QUERY_BATCH_SIZE);
                    } else {
                        docs = searcher.search(query, LUCENE_QUERY_BATCH_SIZE);
                    }

                    for (ScoreDoc doc : docs.scoreDocs) {
View Full Code Here

Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

                    IndexSearcher searcher = indexNode.getSearcher();
                    Query query = getQuery(filter, searcher.getIndexReader(),
                            nonFullTextConstraints, analyzer, indexNode.getDefinition());
                    TopDocs docs;
                    if (lastDoc != null) {
                        docs = searcher.searchAfter(lastDoc, query, LUCENE_QUERY_BATCH_SIZE);
                    } else {
                        docs = searcher.search(query, LUCENE_QUERY_BATCH_SIZE);
                    }

                    for (ScoreDoc doc : docs.scoreDocs) {
View Full Code Here

Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

                    TopDocs docs;
                    long time = System.currentTimeMillis();
                    if (lastDoc != null) {
                        LOG.debug("loading the next {} entries for query {}", nextBatchSize, query);
                        if (sort == null) {
                            docs = searcher.searchAfter(lastDoc, query, nextBatchSize);
                        } else {
                            docs = searcher.searchAfter(lastDoc, query, LUCENE_QUERY_BATCH_SIZE, sort);
                        }
                    } else {
                        LOG.debug("loading the first {} entries for query {}", nextBatchSize, query);
View Full Code Here

Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

                    if (lastDoc != null) {
                        LOG.debug("loading the next {} entries for query {}", nextBatchSize, query);
                        if (sort == null) {
                            docs = searcher.searchAfter(lastDoc, query, nextBatchSize);
                        } else {
                            docs = searcher.searchAfter(lastDoc, query, LUCENE_QUERY_BATCH_SIZE, sort);
                        }
                    } else {
                        LOG.debug("loading the first {} entries for query {}", nextBatchSize, query);
                        if (sort == null) {
                            docs = searcher.search(query, nextBatchSize);
View Full Code Here

Examples of org.apache.lucene.search.IndexSearcher.searchAfter()

                            nonFullTextConstraints, analyzer, indexNode.getDefinition());
                    TopDocs docs;
                    long time = System.currentTimeMillis();
                    if (lastDoc != null) {
                        LOG.debug("loading the next {} entries for query {}", nextBatchSize, query);
                        docs = searcher.searchAfter(lastDoc, query, nextBatchSize);
                    } else {
                        LOG.debug("loading the first {} entries for query {}", nextBatchSize, query);
                        docs = searcher.search(query, nextBatchSize);
                    }
                    time = System.currentTimeMillis() - time;
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.