java.lang.Object
org.apache.lucene.search.vectorhighlight.docStats

public class docStats extends Object
Get stats from a FieldQuery in the context of the package to access to protected methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    occs(org.apache.lucene.index.IndexReader reader, int docId, String fieldName, org.apache.lucene.search.vectorhighlight.FieldQuery fieldQuery)
    Get count of matching tokens in a document from a query.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • occs

      public static int occs(org.apache.lucene.index.IndexReader reader, int docId, String fieldName, org.apache.lucene.search.vectorhighlight.FieldQuery fieldQuery) throws IOException
      Get count of matching tokens in a document from a query.
      Parameters:
      reader - IndexReader of the index
      docId - document id to be highlighted
      fieldName - field of the document to get terms from
      fieldQuery - FieldQuery object
      Returns:
      count of matching tokens
      Throws:
      IOException - If there is a low-level I/O error