Class LuceneTermFreq

java.lang.Object
es.uam.eps.ir.relison.content.index.freq.lucene.LuceneTermFreq
All Implemented Interfaces:
TermFreq

public class LuceneTermFreq
extends java.lang.Object
implements TermFreq
Lucene implementation of the TermFreq object.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) org.apache.lucene.index.TermsEnum terms
    The term.
  • Constructor Summary

    Constructors 
    Constructor Description
    LuceneTermFreq​(org.apache.lucene.index.TermsEnum t)
    Constructor
  • Method Summary

    Modifier and Type Method Description
    long getFreq()
    Obtains the frequency.
    java.lang.String getTerm()
    Obtains the term.

    Methods inherited from class java.lang.Object

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

    • terms

      org.apache.lucene.index.TermsEnum terms
      The term.
  • Constructor Details

    • LuceneTermFreq

      public LuceneTermFreq​(org.apache.lucene.index.TermsEnum t)
      Constructor
      Parameters:
      t - the term.
  • Method Details

    • getTerm

      public java.lang.String getTerm() throws java.io.IOException
      Description copied from interface: TermFreq
      Obtains the term.
      Specified by:
      getTerm in interface TermFreq
      Returns:
      the term.
      Throws:
      java.io.IOException - if something fails while reading the term.
    • getFreq

      public long getFreq() throws java.io.IOException
      Description copied from interface: TermFreq
      Obtains the frequency.
      Specified by:
      getFreq in interface TermFreq
      Returns:
      the frequency.
      Throws:
      java.io.IOException - if something fails while obtaining the frequency.