Class FeaturedQueryResultSet

    • Constructor Detail

      • FeaturedQueryResultSet

        public FeaturedQueryResultSet​(ResultSet resultSet)
      • FeaturedQueryResultSet

        public FeaturedQueryResultSet​(int length)
    • Method Detail

      • getFeatureNames

        public java.lang.String[] getFeatureNames()
        Gets the names of the features that have been added to this ResultSet
        Specified by:
        getFeatureNames in interface FeaturedResultSet
      • putFeatureScores

        public void putFeatureScores​(java.lang.String name,
                                     double[] scores)
        Add a feature to this result set
        Specified by:
        putFeatureScores in interface FeaturedResultSet
      • getFeatureScores

        public double[] getFeatureScores​(java.lang.String name)
        Get all scores for the enabled docids given a feature name
        Specified by:
        getFeatureScores in interface FeaturedResultSet
      • getFeatureScores

        public double[] getFeatureScores​(int id)
        Get the feature scores for a given feature id
        Specified by:
        getFeatureScores in interface FeaturedResultSet
      • getResultSet

        public ResultSet getResultSet​(int startPosition,
                                      int length)
        Crops the existing result file and extracts a subset from the given starting point to the ending point.
        Specified by:
        getResultSet in interface ResultSet
        Overrides:
        getResultSet in class QueryResultSet
        Parameters:
        startPosition - the beginning of the subset.
        length - the number of entries to get.
        Returns:
        a subset of the current result set.
      • getResultSet

        public ResultSet getResultSet​(int[] positions)
        Extracts a subset of the resultset given by the list parameter, which contains a list of positions in the resultset that should be saved.
        Specified by:
        getResultSet in interface ResultSet
        Overrides:
        getResultSet in class QueryResultSet
        Parameters:
        positions - int[] the list of elements in the current list that should be kept.
        Returns:
        a subset of the current result set specified by the list.
      • sort

        public void sort()
        Description copied from interface: ResultSet
        Sorts all documents in this resultset by descending score
        Specified by:
        sort in interface ResultSet
        Overrides:
        sort in class QueryResultSet
      • 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 QueryResultSet
        Parameters:
        topDocs - number of documents to top-rank