Examples of docFreq()


Examples of org.apache.lucene.search.FuzzyTermsEnum.docFreq()

     
      // ignore exact match of the same term
      if (queryTerm.bytesEquals(candidateTerm))
        continue;
     
      int df = e.docFreq();
     
      // check docFreq if required
      if (df <= docfreq)
        continue;
     
View Full Code Here

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

   */
  public boolean exist(String word) throws IOException {
    // obtainSearcher calls ensureOpen
    final IndexSearcher indexSearcher = obtainSearcher();
    try{
      return indexSearcher.docFreq(F_WORD_TERM.createTerm(word)) > 0;
    } finally {
      releaseSearcher(indexSearcher);
    }
  }

View Full Code Here

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

  public final boolean exist(final String word) throws IOException {
    ensureOpen();
    final IndexAccessor accessor = this.spellIndex.getAccessor();
    final IndexSearcher indexSearcher = (IndexSearcher) accessor.getPrioritizedSearcher();
    try {
      return indexSearcher.docFreq(F_WORD_TERM.createTerm(word)) > 0;
    } finally {
      if (accessor != null && indexSearcher != null) {
        accessor.release(indexSearcher);
      }
    }
View Full Code Here

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

          int len = word.length();
          if (len < THREE) {
            continue; // too short we bail but "too long" is fine...
          }

          if (indexSearcher.docFreq(F_WORD_TERM.createTerm(word)) > 0) {
            // if the word already exist in the gramindex
            continue;
          }

          // ok index the word
View Full Code Here

Examples of org.apache.lucene.search.TermStatistics.docFreq()

                Term term = (Term) keys[i];
                out.writeString(term.field());
                out.writeBytesRef(term.bytes());
                TermStatistics stats = (TermStatistics) values[i];
                out.writeBytesRef(stats.term());
                out.writeVLong(stats.docFreq());
                out.writeVLong(DfsSearchResult.addOne(stats.totalTermFreq()));
            }
        }
        DfsSearchResult.writeFieldStats(out, fieldStatistics);
        out.writeVLong(maxDoc);
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.