Class FatCandidateResultSet

    • Constructor Detail

      • FatCandidateResultSet

        public FatCandidateResultSet()
      • FatCandidateResultSet

        public FatCandidateResultSet​(java.util.Collection<CandidateResult> q,
                                     CollectionStatistics cs,
                                     java.lang.String[] queryTerms,
                                     EntryStatistics[] entryStats,
                                     double[] keyFrequency,
                                     java.util.Set<java.lang.String>[] tags)
    • Method Detail

      • getPostings

        public WritablePosting[][] getPostings()
        Description copied from interface: FatResultSet
        Returns a 2D array of posting objects for the document and terms in this result set. The array is indexed by document then by term. The first dimension retains the same order as the Docids array of the result set. The second dimension has the same ordering as the QueryTerms/EntryStatistics arrays.
        Specified by:
        getPostings in interface FatResultSet
        Returns:
        2D array of postings.
      • getKeyFrequencies

        public double[] getKeyFrequencies()
        Description copied from interface: FatResultSet
        Return the frequencies of each of the query terms in the query
        Specified by:
        getKeyFrequencies in interface FatResultSet
      • getQueryTerms

        public java.lang.String[] getQueryTerms()
        Description copied from interface: FatResultSet
        Get the query terms in this query. This might be encoded in PostingListManager form
        Specified by:
        getQueryTerms in interface FatResultSet
      • readFields

        public void readFields​(java.io.DataInput in)
                        throws java.io.IOException
        Specified by:
        readFields in interface org.apache.hadoop.io.Writable
        Throws:
        java.io.IOException
      • write

        public void write​(java.io.DataOutput out)
                   throws java.io.IOException
        Specified by:
        write in interface org.apache.hadoop.io.Writable
        Throws:
        java.io.IOException
      • getResultSet

        public FatResultSet getResultSet​(int start,
                                         int length)
        Description copied from class: CandidateResultSet
        Crops the existing result file and extracts a subset from the given starting point, with the given length.
        Specified by:
        getResultSet in interface ResultSet
        Overrides:
        getResultSet in class CandidateResultSet
        Parameters:
        start - the beginning of the subset.
        length - the length of the subset.
        Returns:
        a subset of the current result set.
      • sort

        public void sort​(int topDocs)
        Description copied from interface: ResultSet
        Sorts the top topDocs document in this resultset be first. The order of the remaining documents is undefined.
        Specified by:
        sort in interface ResultSet
        Overrides:
        sort in class CandidateResultSet
        Parameters:
        topDocs - number of documents to top-rank
      • setQueryTerms

        public void setQueryTerms​(java.lang.String[] qs)
        Specified by:
        setQueryTerms in interface FatResultSet
      • getTags

        public java.util.Set<java.lang.String>[] getTags()
        Description copied from interface: FatResultSet
        Return the tags of each of the query terms in the query
        Specified by:
        getTags in interface FatResultSet
      • setTags

        public void setTags​(java.util.Set<java.lang.String>[] tags)
        Specified by:
        setTags in interface FatResultSet