Class SearchResult

java.lang.Object
org.codelibs.fess.rank.fusion.SearchResult

public class SearchResult extends Object
Represents the result of a search operation in the rank fusion system. This class encapsulates all the information returned from a search query, including the list of matching documents, total record count, query execution time, facet information, and metadata about the search results.
  • Field Details

    • documentList

      protected final List<Map<String,Object>> documentList
      The list of documents returned by the search query.
    • allRecordCount

      protected final long allRecordCount
      The total number of records that match the search criteria.
    • allRecordCountRelation

      protected final String allRecordCountRelation
      The relation type indicating how the record count should be interpreted (e.g., "eq", "gte").
    • queryTime

      protected final long queryTime
      The time taken to execute the search query in milliseconds.
    • partialResults

      protected final boolean partialResults
      Flag indicating whether the search results are partial due to timeout or other constraints.
    • facetResponse

      protected final FacetResponse facetResponse
      The facet response containing aggregated facet information for the search results.
  • Method Details

    • getDocumentList

      public List<Map<String,Object>> getDocumentList()
      Gets the list of documents returned by the search query.
      Returns:
      The list of search result documents
    • getAllRecordCount

      public long getAllRecordCount()
      Gets the total number of records that match the search criteria.
      Returns:
      The total record count
    • getAllRecordCountRelation

      public String getAllRecordCountRelation()
      Gets the relation type indicating how the record count should be interpreted.
      Returns:
      The record count relation (e.g., "eq" for exact, "gte" for greater than or equal)
    • getQueryTime

      public long getQueryTime()
      Gets the time taken to execute the search query.
      Returns:
      The query execution time in milliseconds
    • isPartialResults

      public boolean isPartialResults()
      Checks whether the search results are partial due to timeout or other constraints.
      Returns:
      true if the results are partial, false if complete
    • getFacetResponse

      public FacetResponse getFacetResponse()
      Gets the facet response containing aggregated facet information.
      Returns:
      The facet response, or null if no facets were requested
    • create

      public static org.codelibs.fess.rank.fusion.SearchResult.SearchResultBuilder create()
      Creates a new SearchResultBuilder for constructing SearchResult instances.
      Returns:
      A new SearchResultBuilder instance
    • toString

      public String toString()
      Overrides:
      toString in class Object