Class SearchResultGroup

java.lang.Object
io.goobi.viewer.model.search.SearchResultGroup
All Implemented Interfaces:
Serializable

public class SearchResultGroup extends Object implements Serializable
Used for creating separate groups of search results for a single query. Each group can provide its own filter query for custom results.
See Also:
  • Constructor Details

    • SearchResultGroup

      public SearchResultGroup(String name, String query, int previewHitCount, boolean useAsAdvancedSearchTemplate)
      Parameters:
      name -
      query -
      previewHitCount -
      useAsAdvancedSearchTemplate -
  • Method Details

    • createDefaultGroup

      public static SearchResultGroup createDefaultGroup()
      Returns:
      Created SearchResultGroup
    • createDefaultGroup

      public static SearchResultGroup createDefaultGroup(String query)
      Parameters:
      query -
      Returns:
      Created SearchResultGroup
    • getConfiguredResultGroups

      public static List<SearchResultGroup> getConfiguredResultGroups()
      Returns a list of configured result groups or a default group if none are configured.
      Returns:
      List
    • isDisplayExpandUrl

      public boolean isDisplayExpandUrl()
      Returns:
      true if not default group and hitsCount larger than previewHitCount; false otherwise
    • getName

      public String getName()
      Returns:
      the name
    • getQuery

      public String getQuery()
      Returns:
      the query
    • getPreviewHitCount

      public int getPreviewHitCount()
      Returns:
      the previewHitCount
    • isUseAsAdvancedSearchTemplate

      public boolean isUseAsAdvancedSearchTemplate()
      Returns:
      the useAsAdvancedSearchTemplate
    • getHitsCount

      public long getHitsCount()
      Returns:
      the hitsCount
    • setHitsCount

      public void setHitsCount(long hitsCount)
      Parameters:
      hitsCount - the hitsCount to set
    • getHitLocationList

      public List<Location> getHitLocationList()
      Returns:
      the hitLocationList
    • setHitLocationList

      public void setHitLocationList(List<Location> hitLocationList)
      Parameters:
      hitLocationList - the hitLocationList to set
    • isHasGeoLocationHits

      public boolean isHasGeoLocationHits()
      Returns:
      the hasGeoLocationHits
    • setHasGeoLocationHits

      public void setHasGeoLocationHits(boolean hasGeoLocationHits)
      Parameters:
      hasGeoLocationHits - the hasGeoLocationHits to set
    • getHits

      public List<SearchHit> getHits()
      Returns:
      the hits