Examples of HitCollector


Examples of org.apache.lucene.search.HitCollector

            }
        }

        private void collectContextHits() throws IOException {
            if (!contextHitsCalculated) {
                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        contextHits.set(doc);
                    }
                }); // find all
                contextHitsCalculated = true;
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

        try {
            IndexSearcher searcher = new IndexSearcher(reader);
            try {
                Query q = new TermQuery(new Term(
                        FieldNames.WEAK_REFS, id.toString()));
                searcher.search(q, new HitCollector() {
                    public void collect(int doc, float score) {
                        docs.add(doc);
                    }
                });
            } finally {
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

        }

        private void collectContextHits() throws IOException {
            if (!contextHitsCalculated) {
                long time = System.currentTimeMillis();
                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        contextHits.set(doc);
                    }
                }); // find all
                contextHitsCalculated = true;
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

        }

        private void calculateChildren() throws IOException {
            if (uuids == null) {
                uuids = new ArrayList();
                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        hits.set(doc);
                    }
                });

                // collect nameTest hits
                final BitSet nameTestHits = new BitSet();
                if (nameTestScorer != null) {
                    nameTestScorer.score(new HitCollector() {
                        public void collect(int doc, float score) {
                            nameTestHits.set(doc);
                        }
                    });
                }
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

        }

        private void calculateChildren() throws IOException {
            if (uuids == null) {
                uuids = new ArrayList();
                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        hits.set(doc);
                    }
                });

                // collect nameTest hits
                final BitSet nameTestHits = new BitSet();
                if (nameTestScorer != null) {
                    nameTestScorer.score(new HitCollector() {
                        public void collect(int doc, float score) {
                            nameTestHits.set(doc);
                        }
                    });
                }
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

        }

        private void calculateSubHits() throws IOException {
            if (!subHitsCalculated) {

                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        contextHits.set(doc);
                    }
                }); // find all

                if (contextHits.isEmpty()) {
                    // no need to execute sub scorer, context is empty
                } else {
                    subScorer.score(new HitCollector() {
                        public void collect(int doc, float score) {
                            subHits.set(doc);
                            if (score != DEFAULT_SCORE.floatValue()) {
                                scores.put(new Integer(doc), new Float(score));
                            }
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

            if (hits == null) {

                // collect all context nodes
                Map uuids = new HashMap();
                final Hits contextHits = new AdaptingHits();
                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        contextHits.set(doc);
                    }
                });
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

            }
        }

        private void collectContextHits() throws IOException {
            if (!contextHitsCalculated) {
                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        contextHits.set(doc);
                    }
                }); // find all
                contextHitsCalculated = true;
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

        private void calculateParent() throws IOException {
            if (hits == null) {
                hits = new BitSet(reader.maxDoc());

                final IOException[] ex = new IOException[1];
                contextScorer.score(new HitCollector() {

                    private int[] docs = new int[1];

                    public void collect(int doc, float score) {
                        try {
View Full Code Here

Examples of org.apache.lucene.search.HitCollector

         *                     index.
         */
        private void calculateChildren() throws IOException {
            if (uuids == null) {
                uuids = new ArrayList<String>();
                contextScorer.score(new HitCollector() {
                    public void collect(int doc, float score) {
                        hits.set(doc);
                    }
                });

                // collect nameTest hits
                final BitSet nameTestHits = new BitSet();
                if (nameTestScorer != null) {
                    nameTestScorer.score(new HitCollector() {
                        public void collect(int doc, float score) {
                            nameTestHits.set(doc);
                        }
                    });
                }
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.