Examples of addReleasable()


Examples of org.elasticsearch.search.internal.SearchContext.addReleasable()

                numChildDocs = topChildDocs.totalHits;
            }
        }

        ParentWeight parentWeight =  new ParentWeight(rewrittenChildQuery.createWeight(searcher), parentDocs);
        searchContext.addReleasable(parentWeight, Lifetime.COLLECTION);
        return parentWeight;
    }

    int resolveParentDocuments(TopDocs topDocs, SearchContext context, ObjectObjectOpenHashMap<Object, ParentDoc[]> parentDocs) throws Exception {
        int parentHitsResolved = 0;
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.addReleasable()

            if (releaseCollectorResource) {
                // either if we run into an exception or if we return early
                Releasables.close(collector);
            }
        }
        sc.addReleasable(collector, Lifetime.COLLECTION);
        return childWeight;
    }

    private static class ParentOrdAndScoreCollector extends NoopCollector implements Releasable {
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.addReleasable()

        } finally {
            if (abort) {
                Releasables.close(collector);
            }
        }
        sc.addReleasable(collector, Lifetime.COLLECTION);
        final Filter parentFilter;
        if (numFoundParents <= shortCircuitParentDocSet) {
            parentFilter = ParentIdsFilter.createShortCircuitFilter(nonNestedDocsFilter, sc, parentType, collector.values,
                    collector.parentIdxs, numFoundParents);
        } else {
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.addReleasable()

        if (docIdSets == null) {
            assert searcher == null;
            IndexSearcher searcher = searchContext.searcher();
            docIdSets = new IdentityHashMap<>();
            this.searcher = searcher;
            searchContext.addReleasable(this, Lifetime.COLLECTION);

            final Weight weight = searcher.createNormalizedWeight(query);
            for (final LeafReaderContext leaf : searcher.getTopReaderContext().leaves()) {
                final DocIdSet set = new DocIdSet() {
                    @Override
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.