Package org.apache.lucene.search.similarities.Similarity

Examples of org.apache.lucene.search.similarities.Similarity.SimWeight


        long ord = dv.lookupTerm(term.bytes());
        if (ord >= 0) {
          boolean success = ords.add(ord);
          assert success; // no dups
          TermContext context = TermContext.build(reader.getContext(), term);
          SimWeight w = weight.similarity.computeWeight(1f,
                        searcher.collectionStatistics("field"),
                        searcher.termStatistics(term, context));
          w.getValueForNormalization(); // ignored
          w.normalize(1F, 1F);
          sims[(int)ord] = weight.similarity.simScorer(w, reader.getContext());
        }
      }
    }
View Full Code Here


        long ord = dv.lookupTerm(term.bytes());
        if (ord >= 0) {
          boolean success = ords.add(ord);
          assert success; // no dups
          TermContext context = TermContext.build(reader.getContext(), term, true);
          SimWeight w = weight.similarity.computeWeight(1f,
                        searcher.collectionStatistics("field"),
                        searcher.termStatistics(term, context));
          w.getValueForNormalization(); // ignored
          w.normalize(1F, 1F);
          sims[(int)ord] = weight.similarity.simScorer(w, reader.getContext());
        }
      }
    }
View Full Code Here

        long ord = dv.lookupTerm(term.bytes());
        if (ord >= 0) {
          boolean success = ords.add(ord);
          assert success; // no dups
          TermContext context = TermContext.build(reader.getContext(), term, true);
          SimWeight w = weight.similarity.computeWeight(1f,
                        searcher.collectionStatistics("field"),
                        searcher.termStatistics(term, context));
          w.getValueForNormalization(); // ignored
          w.normalize(1F, 1F);
          sims[(int)ord] = weight.similarity.exactSimScorer(w, reader.getContext());
        }
      }
    }
View Full Code Here

        long ord = dv.lookupTerm(term.bytes());
        if (ord >= 0) {
          boolean success = ords.add(ord);
          assert success; // no dups
          TermContext context = TermContext.build(reader.getContext(), term);
          SimWeight w = weight.similarity.computeWeight(1f,
                        searcher.collectionStatistics("field"),
                        searcher.termStatistics(term, context));
          w.getValueForNormalization(); // ignored
          w.normalize(1F, 1F);
          sims[(int)ord] = weight.similarity.simScorer(w, reader.getContext());
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.lucene.search.similarities.Similarity.SimWeight

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.