Class SearchBean

java.lang.Object
io.goobi.viewer.managedbeans.SearchBean
All Implemented Interfaces:
SearchInterface, Serializable

@Named @SessionScoped public class SearchBean extends Object implements SearchInterface, Serializable
SearchBean
See Also:
  • Field Details

  • Constructor Details

    • SearchBean

      public SearchBean()
      Empty constructor.
  • Method Details

    • init

      @PostConstruct public void init()

      init.

    • setNavigationHelper

      public void setNavigationHelper(NavigationHelper navigationHelper)
      Required setter for ManagedProperty injection for unit tests.
      Parameters:
      navigationHelper - the navigationHelper to set
    • clearSearchItemLists

      public void clearSearchItemLists()

      clearSearchItemLists.

    • search

      Dummy method for component cross-compatibility with CMS searches.
      Returns:
      Navigation outcome
      Throws:
      PresentationException
      IndexUnreachableException
      DAOException
      ViewerConfigurationException
    • search

      Executes the search using already set parameters. Usually called from Pretty URLs.
      Parameters:
      filterQuery - a String object
      Returns:
      Navigation outcome
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
      ViewerConfigurationException - if any.
    • searchSimple

      public String searchSimple()
      Perform a simple Search Action method for search buttons (simple search).
      Specified by:
      searchSimple in interface SearchInterface
      Returns:
      the url to navigate to, or an empty string if naviation is handled internally
    • searchSimple

      public String searchSimple(boolean resetParameters)
      Action method for search buttons (simple search) with an option to reset search parameters.
      Parameters:
      resetParameters - a boolean.
      Returns:
      Navigation outcome
    • searchSimple

      public String searchSimple(boolean resetParameters, boolean resetFacets)
      Action method for search buttons (simple search) with an option to reset search parameters and active facets.
      Parameters:
      resetParameters - a boolean.
      resetFacets - a boolean.
      Returns:
      Navigation outcome
    • simpleSearch

      public String simpleSearch(SearchInterface search)

      simpleSearch.

      Parameters:
      search - a SearchInterface object
      Returns:
      Navigation outcome
    • searchSimpleResetCollections

      public String searchSimpleResetCollections()
      Same as searchSimple() but resets the current facets.
      Returns:
      Navigation outcome
    • searchSimpleSetFacets

      public String searchSimpleSetFacets(String facetString)
      Same as searchSimple() but sets the current facets to the given string
      Parameters:
      facetString - a String object.
      Returns:
      Navigation outcome
    • searchAdvanced

      public String searchAdvanced()
      Perform an advanced Search
      Specified by:
      searchAdvanced in interface SearchInterface
      Returns:
      the url to navigate to, or an empty string if naviation is handled internally
    • searchAdvanced

      public String searchAdvanced(boolean resetParameters)

      searchAdvanced.

      Parameters:
      resetParameters - a boolean.
      Returns:
      Navigation outcome
    • searchDirect

      public String searchDirect()
      Search using currently set search string
      Returns:
      Navigation outcome
    • searchToday

      public String searchToday()
      Executes a search for any content tagged with today's month and day.
      Returns:
      Navigation outcome
    • resetSearchAction

      public String resetSearchAction()
      Action method for the "reset" button in search forms.
      Returns:
      Navigation outcome
    • reset

      public void reset()
      Same as resetSearchAction() without the redirect
    • resetSearch

      public String resetSearch()
      Reset the current search including all results and search parameters Alias for resetSearchAction()
      Specified by:
      resetSearch in interface SearchInterface
      Returns:
      the url to navigate to, or an empty string if naviation is handled internally
    • resetSearchResults

      public void resetSearchResults()
      Resets variables that hold search result data. Does not reset search parameter variables such as type, filter or collection.
    • resetSearchParameters

      public void resetSearchParameters()
      Resets general search options and type specific options for currently unused types.
    • resetSearchParameters

      public void resetSearchParameters(boolean resetAllSearchTypes)

      resetSearchParameters.

      Parameters:
      resetAllSearchTypes - a boolean
    • resetSearchParameters

      public void resetSearchParameters(boolean resetAllSearchTypes, boolean resetCurrentPage)
      Resets general search options and type specific options for currently unused types (all options if is true).
      Parameters:
      resetAllSearchTypes - If true, parameters for the currently used search type are also reset.
      resetCurrentPage - If true, currentPage will be reset to 1
    • resetSimpleSearchParameters

      protected void resetSimpleSearchParameters()
      Resets search options for the simple search.
    • resetAdvancedSearchParameters

      protected void resetAdvancedSearchParameters()
      Resets search options for the advanced search.
    • setAdvancedQueryItemsReset

      public void setAdvancedQueryItemsReset(boolean reset)
      "Setter" for resetting the query item list via a f:setPropertyActionListener.
      Parameters:
      reset - a boolean.
    • hitsPerPageListener

      hitsPerPageListener.

      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
      ViewerConfigurationException - if any.
    • executeSearch

      executeSearch.

      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
      ViewerConfigurationException - if any.
    • executeSearch

      executeSearch.

      Parameters:
      filterQuery - a String object
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
      ViewerConfigurationException - if any.
    • setLastUsedSearchPage

      public void setLastUsedSearchPage()
      Set the current ViewerPath as the lastUsedSearchPage. This is where returning to search hit list from record will direct to
    • getFinalSolrQuery

      public String getFinalSolrQuery()

      getFinalSolrQuery.

      Returns:
      a String object
    • getFilterQueries

      public List<String> getFilterQueries()

      getFilterQueries.

      Returns:
      a List object
    • getCombinedFilterQuery

      public String getCombinedFilterQuery()

      getCombinedFilterQuery.

      Returns:
      Generated query
    • getActiveSearchType

      public int getActiveSearchType()
      Get the currently active search type. The possible types are defined in SearchHelper
      Specified by:
      getActiveSearchType in interface SearchInterface
      Returns:
      the active search type
    • setActiveSearchType

      public void setActiveSearchType(int activeSearchType)
      Set the search type to use. The possible types are defined in SearchHelper
      Specified by:
      setActiveSearchType in interface SearchInterface
      Parameters:
      activeSearchType - a int.
    • resetActiveSearchType

      public void resetActiveSearchType()

      resetActiveSearchType.

    • autocomplete

      public List<String> autocomplete(String suggest) throws IndexUnreachableException
      Return suggestions for autocomplete
      Specified by:
      autocomplete in interface SearchInterface
      Parameters:
      suggest - a String object.
      Returns:
      suggestions for autocomplete
      Throws:
      IndexUnreachableException - if any.
    • isSearchInDcFlag

      public boolean isSearchInDcFlag()
      Return if search is performed only within a DC
      Specified by:
      isSearchInDcFlag in interface SearchInterface
      Returns:
      a boolean.
    • isSearchInFacetFieldFlag

      public boolean isSearchInFacetFieldFlag(String fieldName)
      Return if search is performed only within a certain facet field
      Specified by:
      isSearchInFacetFieldFlag in interface SearchInterface
      Returns:
      a boolean.
    • getInvisibleSearchString

      public String getInvisibleSearchString()
      Getter for the invisible (empty) search string. Used for the search field widget for when no search input display is desired.
      Returns:
      empty string
    • setInvisibleSearchString

      public void setInvisibleSearchString(String invisibleSearchString)
      The setter for the invisible search string. Performs all regular settings.
      Parameters:
      invisibleSearchString - a String object.
    • getSearchString

      public String getSearchString()
      Get the current search string for display
      Specified by:
      getSearchString in interface SearchInterface
      Returns:
      the current search string for display
    • getSearchStringForUrl

      public String getSearchStringForUrl()
      Wrapper method for Pretty URL mappings (so that the values is never empty).
      Returns:
      a String object.
    • setSearchStringForUrl

      public void setSearchStringForUrl(String searchString)
      Wrapper method for Pretty URL mappings.
      Parameters:
      searchString - a String object.
    • setSearchString

      public void setSearchString(String searchString)
      Set the actual search string Wrapper for setSearchStringKeepCurrentPage() that also resets currentPage.
      Specified by:
      setSearchString in interface SearchInterface
      Parameters:
      searchString - a String object.
    • getExactSearchString

      public String getExactSearchString()
      Get the actual search string
      Specified by:
      getExactSearchString in interface SearchInterface
      Returns:
      the actual search string
    • setExactSearchString

      public void setExactSearchString(String inSearchString)
      Sets the current searchStringInternal to the given query, without parsing it like the regular setSearchString() method. This method performs URL-unescaping, so using it directly with unescaped queries containing '+' etc. will change the logic.
      Parameters:
      inSearchString - a String object.
    • getExactSearchStringResetGui

      @Deprecated(since="24.01") public String getExactSearchStringResetGui()
      Deprecated.
      user SearchBean.getExactSearchString()
      JSF expects a getter, too.
      Returns:
      a String object.
    • setSortString

      public void setSortString(String sortString)
      Set the sorting search string
      Specified by:
      setSortString in interface SearchInterface
      Parameters:
      sortString - a String object.
    • getSortString

      public String getSortString()
      Return the search string for the selected sort option
      Specified by:
      getSortString in interface SearchInterface
      Returns:
      the search string for the selected sort option
    • getSearchSortingOption

      public SearchSortingOption getSearchSortingOption()

      Getter for the field searchSortingOption.

      Returns:
      the searchSortingOption
    • setSearchSortingOption

      public void setSearchSortingOption(SearchSortingOption searchSortingOption)

      Setter for the field searchSortingOption.

      Parameters:
      searchSortingOption - the searchSortingOption to set
    • getResultGroupsForSearchExecution

      public List<SearchResultGroup> getResultGroupsForSearchExecution()
      Returns relevant search result groups for search execution. If an active group is set, return just that. Otherwise, return either all configured groups or default group (if groups disabled).
      Returns:
      Relevant search result groups
    • isDisplayResultGroupNames

      public boolean isDisplayResultGroupNames()

      isDisplayResultGroupNames.

      Returns:
      true if activeResultGroup null; false otherwise
    • getActiveResultGroupName

      public String getActiveResultGroupName()

      getActiveResultGroupName.

      Specified by:
      getActiveResultGroupName in interface SearchInterface
      Returns:
      activeResultGroup name; "-" if none set
    • setActiveResultGroup

      public void setActiveResultGroup(SearchResultGroup activeResultGroup)

      Setter for the field activeResultGroup.

      Parameters:
      activeResultGroup - a SearchResultGroup object
    • setActiveResultGroupName

      public void setActiveResultGroupName(String activeResultGroupName)

      setActiveResultGroupName.

      Specified by:
      setActiveResultGroupName in interface SearchInterface
      Parameters:
      activeResultGroupName - a String object
    • mirrorAdvancedSearchCurrentHierarchicalFacets

      public void mirrorAdvancedSearchCurrentHierarchicalFacets()
      Matches the selected collection item in the advanced search to the current value of currentCollection.
    • removeChronologyFacetAction

      @Deprecated(since="2023.01") public String removeChronologyFacetAction()
      Deprecated.
      No longer relevant for current implementation

      removeChronologyFacetAction.

      Returns:
      Navigation outcome
    • removeRangeFacetAction

      public String removeRangeFacetAction(String field)

      removeRangeFacetAction.

      Parameters:
      field - a String object
      Returns:
      Navigation outcome
    • removeFacetAction

      public String removeFacetAction(String facetQuery)

      removeFacetAction.

      Parameters:
      facetQuery - a String object.
      Returns:
      Navigation outcome
    • getCurrentPage

      public int getCurrentPage()
      Return the current result list page number
      Specified by:
      getCurrentPage in interface SearchInterface
      Returns:
      the current result list page number
    • setCurrentPage

      public void setCurrentPage(int currentPage)

      Setter for the field currentPage.

      Parameters:
      currentPage - the currentPage to set
    • getHitsCount

      public long getHitsCount()
      get total number of hits of the last search
      Specified by:
      getHitsCount in interface SearchInterface
      Returns:
      the total number of hits of the last search
    • setHitsCount

      public void setHitsCount(long hitsCount)

      setHitsCount.

      Parameters:
      hitsCount - the hitsCount to set
    • getSearchTerms

      public Map<String,Set<String>> getSearchTerms()

      Getter for the field searchTerms.

      Returns:
      the searchTerms
    • getCurrentHitIndex

      public int getCurrentHitIndex()

      Getter for the field currentHitIndex.

      Returns:
      the currentHitIndex
    • getCurrentHitIndexDisplay

      public int getCurrentHitIndexDisplay()

      getCurrentHitIndexDisplay.

      Returns:
      a int.
    • increaseCurrentHitIndex

      public void increaseCurrentHitIndex()

      increaseCurrentHitIndex.

    • getHitIndexOperand

      public int getHitIndexOperand()

      Getter for the field hitIndexOperand.

      Returns:
      the hitIndexOperand
    • setHitIndexOperand

      public void setHitIndexOperand(int hitIndexOperand)

      Setter for the field hitIndexOperand.

      Parameters:
      hitIndexOperand - the hitIndexOperand to set
    • findCurrentHitIndex

      public void findCurrentHitIndex(String pi, int page, boolean aggregateHits)
      Returns the index of the currently displayed BrowseElement, if it is present in the search hit list.
      Parameters:
      pi - Record identifier of the loaded record.
      page - Page number of he loaded record.
      aggregateHits - If true, only the identifier has to match, page number is ignored.
    • getNextElement

      Returns the next BrowseElement in the hit list relative to the given index.
      Returns:
      Next BrowseElement in the list; same BrowseElement if this is the last index in the list.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
      ViewerConfigurationException - if any.
    • getPreviousElement

      Returns the previous BrowseElement in the hit list relative to the given index.
      Returns:
      Previous BrowseElement in the list; same BrowseElement if this is the first index in the list.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
      ViewerConfigurationException - if any.
    • getSearchFilters

      public List<SearchFilter> getSearchFilters()
      Get a list of all available search filters
      Specified by:
      getSearchFilters in interface SearchInterface
      Returns:
      a list of all available search filters
    • getCurrentSearchFilterString

      public String getCurrentSearchFilterString()
      Return the current search filter as string
      Specified by:
      getCurrentSearchFilterString in interface SearchInterface
      Returns:
      the current search filter as string
    • setCurrentSearchFilterString

      public void setCurrentSearchFilterString(String searchFilterLabel)
      Set the current search filter as string Sets currentSearchFilter via the given label value.
      Specified by:
      setCurrentSearchFilterString in interface SearchInterface
      Parameters:
      searchFilterLabel - a String object.
    • resetSearchFilter

      public void resetSearchFilter()

      resetSearchFilter.

    • resetCurrentHitIndex

      public void resetCurrentHitIndex()

      resetCurrentHitIndex.

    • isSortingEnabled

      public boolean isSortingEnabled()

      isSortingEnabled.

      Returns:
      a boolean.
    • getAdvancedSearchQueryGroup

      public SearchQueryGroup getAdvancedSearchQueryGroup()

      Getter for the field advancedSearchQueryGroup.

      Returns:
      the advancedQueryGroups
    • getAdvancedSearchSelectItems

      public List<StringPair> getAdvancedSearchSelectItems(String field, String language, boolean hierarchical) throws PresentationException, IndexUnreachableException, DAOException
      Populates the list of advanced search drop-down values for the given field. List is only generated once per user session.
      Parameters:
      field - The index field for which to get drop-down values.
      language - Translation language for the values.
      hierarchical - If true, the menu items will be listed in their corresponding hierarchy (e.g. DC)
      Returns:
      a List object.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
    • getAllCollections

      public List<StringPair> getAllCollections()
      Returns drop-down items for all collection names. Convenience method that retrieves the current language from NavigationHelper. This method shouldn't throw exceptions, otherwise it can cause an IllegalStateException.
      Returns:
      a List object.
    • getAllCollections

      public List<StringPair> getAllCollections(String language) throws PresentationException, IndexUnreachableException, DAOException
      Returns drop-down items for all collection names. The displayed values are translated into the given language.
      Parameters:
      language - a String object.
      Returns:
      a List object.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
      DAOException - if any.
    • getAdvancedSearchAllowedFields

      public List<AdvancedSearchFieldConfiguration> getAdvancedSearchAllowedFields()

      getAdvancedSearchAllowedFields.

      Returns:
      List of allowed advanced search fields
    • getAdvancedSearchFirstItemAllowedFields

      public List<AdvancedSearchFieldConfiguration> getAdvancedSearchFirstItemAllowedFields()
    • getAdvancedSearchAllowedFields

      public static List<AdvancedSearchFieldConfiguration> getAdvancedSearchAllowedFields(String language, String template, boolean addSearchFilters)
      Returns index field names allowed for advanced search use. If language-specific index fields are used, those that don't match the current locale are omitted.
      Parameters:
      language - Optional language code for filtering language-specific fields
      template - a String object
      addSearchFilters -
      Returns:
      List of allowed advanced search fields
    • getSearchInCurrentItemString

      public String getSearchInCurrentItemString()

      Getter for the field searchInCurrentItemString.

      Returns:
      the searchInCurrentItemString
    • setSearchInCurrentItemString

      public void setSearchInCurrentItemString(String searchInCurrentItemString)

      Setter for the field searchInCurrentItemString.

      Parameters:
      searchInCurrentItemString - the searchInCurrentItemString to set
    • getCurrentSearch

      public Search getCurrentSearch()

      Getter for the field currentSearch.

      Returns:
      the currentSearch
    • setCurrentSearch

      public void setCurrentSearch(Search currentSearch)

      Setter for the field currentSearch.

      Parameters:
      currentSearch - the currentSearch to set
    • isFuzzySearchEnabled

      public boolean isFuzzySearchEnabled()

      isFuzzySearchEnabled.

      Returns:
      the fuzzySearchEnabled
    • setFuzzySearchEnabled

      public void setFuzzySearchEnabled(boolean fuzzySearchEnabled)

      Setter for the field fuzzySearchEnabled.

      Parameters:
      fuzzySearchEnabled - the fuzzySearchEnabled to set
    • saveSearchAction

      public String saveSearchAction() throws DAOException

      saveSearchAction.

      Returns:
      a String object.
      Throws:
      DAOException - if any.
    • getRssUrl

      public String getRssUrl() throws ViewerConfigurationException

      getRssUrl.

      Returns:
      URL to the RSS feed for the current search
      Throws:
      ViewerConfigurationException - if any.
    • isSearchSavingEnabled

      public boolean isSearchSavingEnabled()

      isSearchSavingEnabled.

      Returns:
      a boolean.
    • executeSavedSearchAction

      public String executeSavedSearchAction(Search search)

      executeSavedSearchAction.

      Parameters:
      search - a Search object.
      Returns:
      a String object.
    • exportSearchAsRisAction

      public String exportSearchAsRisAction() throws IndexUnreachableException

      exportSearchAsRisAction.

      Returns:
      a String object.
      Throws:
      IndexUnreachableException - if any.
    • exportSearchAsExcelAction

      public String exportSearchAsExcelAction() throws IndexUnreachableException

      exportSearchAsExcelAction.

      Returns:
      a String object.
      Throws:
      IndexUnreachableException - if any.
    • getHitsPerPage

      public int getHitsPerPage()

      Getter for the field hitsPerPage.

      Returns:
      the hitsPerPage
    • setHitsPerPage

      public void setHitsPerPage(int hitsPerPage)

      Setter for the field hitsPerPage.

      Parameters:
      hitsPerPage - the hitsPerPage to set
    • setHitsPerPageNoTrigger

      public void setHitsPerPageNoTrigger(int hitsPerPage)
      Like setHitsPerPage() but doesn't trigger the boolean.
      Parameters:
      hitsPerPage - the hitsPerPage to set
    • isHitsPerPageSetterCalled

      public boolean isHitsPerPageSetterCalled()

      isHitsPerPageSetterCalled.

      Returns:
      the hitsPerPageSetterCalled
    • setHitsPerPageSetterCalled

      public void setHitsPerPageSetterCalled(boolean hitsPerPageSetterCalled)

      Setter for the field hitsPerPageSetterCalled.

      Parameters:
      hitsPerPageSetterCalled - the hitsPerPageSetterCalled to set
    • getAdvancedSearchQueryInfo

      public String getAdvancedSearchQueryInfo()

      Getter for the field advancedSearchQueryInfo.

      Returns:
      the advancedSearchQueryInfo
    • getFacets

      public SearchFacets getFacets()
      List all current SearchFacets
      Specified by:
      getFacets in interface SearchInterface
      Returns:
      all current SearchFacets
    • isDownloadReady

      public Future<Boolean> isDownloadReady()

      isDownloadReady.

      Returns:
      a Future object.
    • getTotalNumberOfVolumes

      public long getTotalNumberOfVolumes() throws IndexUnreachableException, PresentationException

      getTotalNumberOfVolumes.

      Returns:
      a long.
      Throws:
      IndexUnreachableException - if any.
      PresentationException - if any.
    • getSearchUrl

      public String getSearchUrl()
      Returns the proper search URL part for the current search type.
      Returns:
      a String object.
    • getLastPage

      public int getLastPage()
      Return the last result list page number
      Specified by:
      getLastPage in interface SearchInterface
      Returns:
      the last result list page number
    • getStructElement

      getStructElement.

      Parameters:
      pi - a String object.
      Returns:
      a StructElement object.
      Throws:
      IndexUnreachableException - if any.
      PresentationException - if any.
    • getCurrentSearchUrlRoot

      public String getCurrentSearchUrlRoot()
      Return the base url of the current search page, without any search parameters
      Specified by:
      getCurrentSearchUrlRoot in interface SearchInterface
      Returns:
      the base url of the current search page, without any search parameters
    • getCurrentSearchUrlPart

      public String getCurrentSearchUrlPart()

      getCurrentSearchUrlPart.

      Returns:
      Parameter string for pretty:search5 URLs.
    • updateFacetItem

      public void updateFacetItem(String field, boolean hierarchical)

      updateFacetItem.

      Parameters:
      field - a String object.
      hierarchical - a boolean.
    • getStaticFacets

      public List<IFacetItem> getStaticFacets(String field, String subQuery, Integer resultLimit, Boolean reverseOrder) throws PresentationException, IndexUnreachableException
      Returns a list of FilterLink elements for the given field over all documents in the index (optionally filtered by a subquery). Replaces the method in the old TagLib class.
      Parameters:
      field - a String object.
      subQuery - a String object.
      resultLimit - a Integer object.
      reverseOrder - a Boolean object.
      Returns:
      a List object.
      Throws:
      PresentationException - if any.
      IndexUnreachableException - if any.
    • isSearchPerformed

      public boolean isSearchPerformed()
      Check if a search has been performed and any results are to be excepted (provided the search yielded any)
      Specified by:
      isSearchPerformed in interface SearchInterface
      Returns:
      whether a search has been performed after the last reset
    • isExplicitSearchPerformed

      public boolean isExplicitSearchPerformed()
      Check if a search has been triggered by the user and not yet been reset
      Specified by:
      isExplicitSearchPerformed in interface SearchInterface
      Returns:
      if a search has been triggered by the user and not yet been reset
    • setFirstQueryItemValue

      public void setFirstQueryItemValue(String value)

      setFirstQueryItemValue.

      Parameters:
      value - a String object.
    • getFirstQueryItemValue

      public void getFirstQueryItemValue()

      getFirstQueryItemValue.

    • setBookmarkListName

      public void setBookmarkListName(String name)

      setBookmarkListName.

      Parameters:
      name - a String object.
    • getBookmarkListName

      public String getBookmarkListName()

      getBookmarkListName.

      Returns:
      a String object.
    • setBookmarkListSharedKey

      public void setBookmarkListSharedKey(String key)

      setBookmarkListName.

      Parameters:
      key - The sharing key to set
    • getBookmarkListSharedKey

      public String getBookmarkListSharedKey()

      getBookmarkListName.

      Returns:
      a String object.
    • getProximitySearchDistance

      public int getProximitySearchDistance()

      Getter for the field proximitySearchDistance.

      Returns:
      a int
    • searchInRecord

      public String searchInRecord(String queryField, String queryValue)

      searchInRecord.

      Parameters:
      queryField - a String object
      queryValue - a String object
      Returns:
      Navigation outcome
    • searchInField

      public String searchInField(String queryField)
      Executes an advanced search using the given field. The search value is set via the HTML component using this method.
      Parameters:
      queryField - Advanced search field to query
      Returns:
      Navigation outcome
    • isSolrIndexReachable

      public boolean isSolrIndexReachable()

      isSolrIndexReachable.

      Returns:
      true if Solr ping successful; false otherwise
    • hasGeoLocationHits

      public boolean hasGeoLocationHits()

      hasGeoLocationHits.

      Specified by:
      hasGeoLocationHits in interface SearchInterface
      Returns:
      a boolean
    • getHitsLocations

      public List<String> getHitsLocations()

      getHitsLocations.

      Returns:
      a List object
    • isShowGeoFacetMap

      public boolean isShowGeoFacetMap()
      Display the geo facet map if there are any hits available with geo coordinates
      Returns:
      true if search hits with coordinates available; false otherwise
    • getHitsMap

      public GeoMap getHitsMap()

      getHitsMap.

      Specified by:
      getHitsMap in interface SearchInterface
      Returns:
      a GeoMap object
    • facetifyField

      public String facetifyField(String fieldName)

      facetifyField.

      Parameters:
      fieldName - a String object
      Returns:
      Facet variant of the given fieldName
    • getFieldFacetValues

      public List<FacetItem> getFieldFacetValues(String field, int num) throws IndexUnreachableException

      getFieldFacetValues.

      Parameters:
      field - a String object
      num - a int
      Returns:
      List of facet values for the given field
      Throws:
      IndexUnreachableException
    • getFieldFacetValues

      public List<FacetItem> getFieldFacetValues(String field, int num, String filterQuery) throws IndexUnreachableException

      getFieldFacetValues.

      Parameters:
      field - a String object
      num - a int
      filterQuery - a String object
      Returns:
      List of facet values for the given field
      Throws:
      IndexUnreachableException
    • getSearchSortingOptions

      public Collection<SearchSortingOption> getSearchSortingOptions(String language)

      getSearchSortingOptions.

      Parameters:
      language - a String object
      Returns:
      List of sorting options for the given language
    • getQueryResultCount

      public long getQueryResultCount(String query) throws IndexUnreachableException, PresentationException

      getQueryResultCount.

      Parameters:
      query - a String object
      Returns:
      Number of hits for the given query
      Throws:
      IndexUnreachableException
      PresentationException
    • getFinalSolrQueryEscaped

      public String getFinalSolrQueryEscaped()

      getFinalSolrQueryEscaped.

      Returns:
      URL-encoded final query
    • getCombinedFilterQueryEscaped

      public String getCombinedFilterQueryEscaped()

      getCombinedFilterQueryEscaped.

      Returns:
      URL-encoded combined filter query
    • getLastUsedSearchUrl

      public String getLastUsedSearchUrl()
      The url of the viewer page loaded when the last search operation was performed, stored ing lastUsedSearchPage or the url of the default search or searchAdvanved page depending on the state of this bean
      Returns:
      a URL string
    • changeSorting

      public String changeSorting() throws IOException
      action to execute to change sort sort order of hits
      Specified by:
      changeSorting in interface SearchInterface
      Returns:
      Navigation outcome
      Throws:
      IOException