Class SearchBean
- All Implemented Interfaces:
SearchInterface,Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautocomplete(String suggest) Return suggestions for autocompleteaction to execute to change sort sort order of hitsvoidclearSearchItemLists.executeSavedSearchAction(Search search) executeSavedSearchAction.voidexecuteSearch.voidexecuteSearch(String filterQuery) executeSearch.exportSearchAsExcelAction.exportSearchAsRisAction.facetifyField(String fieldName) facetifyField.voidfindCurrentHitIndex(String pi, int page, boolean aggregateHits) Returns the index of the currently displayed BrowseElement, if it is present in the search hit list.getActiveContext.getActiveResultGroupName.intGet the currently active search type.getAdvancedSearchAllowedFields.static List<AdvancedSearchFieldConfiguration> getAdvancedSearchAllowedFields(String language, String template, boolean addSearchFilters) Returns index field names allowed for advanced search use.Getter for the fieldadvancedSearchQueryGroup.Getter for the fieldadvancedSearchQueryInfo.getAdvancedSearchSelectItems(String field, String language, boolean hierarchical) Populates the list of advanced search drop-down values for the given field.Returns drop-down items for all collection names.getAllCollections(String language) Returns drop-down items for all collection names.getBookmarkListName.getBookmarkListName.getCombinedFilterQuery.getCombinedFilterQueryEscaped.intGetter for the fieldcurrentHitIndex.intgetCurrentHitIndexDisplay.intReturn the current result list page numberGetter for the fieldcurrentSearch.Return the current search filter as stringgetCurrentSearchUrlPart.Return the base url of the current search page, without any search parametersGet the actual search stringList all currentSearchFacetsgetFieldFacetValues(String field, int num) getFieldFacetValues.getFieldFacetValues(String field, int num, String filterQuery) getFieldFacetValues.getFilterQueries.getFinalSolrQuery.getFinalSolrQueryEscaped.voidgetFirstQueryItemValue.intGetter for the fieldhitIndexOperand.longget total number of hits of the last searchgetHitsLocations.getHitsMap.intGetter for the fieldhitsPerPage.jakarta.servlet.http.HttpServletRequestGetter for the invisible (empty) search string.intReturn the last result list page numberThe url of the viewer page loaded when the last search operation was performed, stored inglastUsedSearchPageor the url of the default search or searchAdvanved page depending on the state of this beanReturns the next BrowseElement in the hit list relative to the given index.Returns the previous BrowseElement in the hit list relative to the given index.intGetter for the fieldproximitySearchDistance.longgetQueryResultCount(String query) getQueryResultCount.Returns relevant search result groups for search execution.getRssUrl.Get a list of all available search filtersGetter for the fieldsearchInCurrentItemString.Getter for the fieldsearchSortingOption.getSearchSortingOptions(String language) getSearchSortingOptions.Get the current search string for displayWrapper method for Pretty URL mappings (so that the values is never empty).Getter for the fieldsearchTerms.Returns the proper search URL part for the current search type.Return the search string for the selected sort optiongetStaticFacets(String field, String subQuery, Integer resultLimit, Boolean reverseOrder) Returns a list of FilterLink elements for the given field over all documents in the index (optionally filtered by a subquery).getStructElement.longgetTotalNumberOfVolumes.booleanhasGeoLocationHits.voidDeprecated.voidincreaseCurrentHitIndex.voidinit()init.booleanisDisplayResultGroupNames.isDownloadReady.booleanCheck if a search has been triggered by the user and not yet been resetbooleanisFuzzySearchEnabled.booleanisHitsPerPageSetterCalled.booleanReturn if search is performed only within a DCbooleanisSearchInFacetFieldFlag(String fieldName) Return if search is performed only within a certain facet fieldbooleanCheck if a search has been performed and any results are to be excepted (provided the search yielded any)booleanisSearchSavingEnabled.booleanDisplay the geo facet map if there are any hits available with geo coordinatesbooleanisSolrIndexReachable.booleanisSortingEnabled.voidMatches the selected collection item in the advanced search to the current value ofcurrentCollection.removeFacetAction(String facetQuery) removeFacetAction.removeRangeFacetAction(String field) removeRangeFacetAction.voidreset()Same asresetSearchAction()without the redirectvoidresetActiveSearchType.protected voidResets search options for the advanced search.voidresetCurrentHitIndex.Reset the current search including all results and search parametersAction method for the "reset" button in search forms.voidresetSearchFilter.voidResets general search options and type specific options for currently unused types.voidresetSearchParameters(boolean resetAllSearchTypes) resetSearchParameters.voidresetSearchParameters(boolean resetAllSearchTypes, boolean resetCurrentPage) Resets general search options and type specific options for currently unused types (all options ifis true). voidResets variables that hold search result data.protected voidResets search options for the simple search.saveSearchAction.search()Dummy method for component cross-compatibility with CMS searches.Executes the search using already set parameters.Perform an advanced SearchsearchAdvanced(boolean resetParameters) searchAdvanced.Search using currently set search stringsearchInField(String queryField) Executes an advanced search using the given field.searchInRecord(String queryField, String queryValue) searchInRecord.Perform a simple SearchsearchSimple(boolean resetParameters) Action method for search buttons (simple search) with an option to reset search parameters.searchSimple(boolean resetParameters, boolean resetFacets) Action method for search buttons (simple search) with an option to reset search parameters and active facets.Same assearchSimple()but resets the current facets.searchSimpleSetFacets(String facetString) Same asbut sets the current facets to the given stringsearchSimple()Executes a search for any content tagged with today's month and day.voidsetActiveContext(String activeContext) Depending on configuration settings, sets the given value as the active search result group name and/or active advanced search template.voidsetActiveResultGroup(SearchResultGroup activeResultGroup) Setter for the fieldactiveResultGroup.voidsetActiveResultGroupName(String activeResultGroupName) Sets activeResultGroup via the given name.voidsetActiveSearchType(int activeSearchType) Set the search type to use.voidsetAdvancedQueryItemsReset(boolean reset) "Setter" for resetting the query item list via a f:setPropertyActionListener.voidsetAdvancedSearchFieldTemplate(String advancedSearchFieldTemplate) voidsetBookmarkListName(String name) setBookmarkListName.voidsetBookmarkListName.voidsetCurrentPage(int currentPage) Setter for the fieldcurrentPage.voidsetCurrentSearch(Search currentSearch) Setter for the fieldcurrentSearch.voidsetCurrentSearchFilterString(String searchFilterLabel) Set the current search filter as stringvoidsetExactSearchString(String inSearchString) Sets the currentsearchStringInternalto the given query, without parsing it like the regular setSearchString() method.voidsetFilterQuery(String filterQuery) voidsetFirstQueryItemValue(String value) setFirstQueryItemValue.voidsetFuzzySearchEnabled(boolean fuzzySearchEnabled) Setter for the fieldfuzzySearchEnabled.voidsetHitIndexOperand(int hitIndexOperand) Setter for the fieldhitIndexOperand.voidsetHitsCount(long hitsCount) setHitsCount.voidsetHitsPerPage(int hitsPerPage) Setter for the fieldhitsPerPage.voidsetHitsPerPageNoTrigger(int hitsPerPage) Like setHitsPerPage() but doesn't trigger the boolean.voidsetHitsPerPageSetterCalled(boolean hitsPerPageSetterCalled) Setter for the fieldhitsPerPageSetterCalled.voidsetInvisibleSearchString(String invisibleSearchString) The setter for the invisible search string.voidSet the currentViewerPathas thelastUsedSearchPage.voidsetNavigationHelper(NavigationHelper navigationHelper) Required setter for ManagedProperty injection for unit tests.voidsetSearchInCurrentItemString(String searchInCurrentItemString) Setter for the fieldsearchInCurrentItemString.voidsetSearchSortingOption(SearchSortingOption searchSortingOption) Setter for the fieldsearchSortingOption.voidsetSearchString(String searchString) Set the actual search stringvoidsetSearchStringForUrl(String searchString) Wrapper method for Pretty URL mappings.voidsetSortString(String sortString) Set the sorting search stringsimpleSearch(SearchInterface search) simpleSearch.voidupdateFacetItem(String field, boolean hierarchical) updateFacetItem.
-
Field Details
-
URL_ENCODING
ConstantURL_ENCODING="UTF8"- See Also:
-
-
Constructor Details
-
SearchBean
public SearchBean()Empty constructor.
-
-
Method Details
-
init
@PostConstruct public void init()init.
-
clearSearchItemLists
public void clearSearchItemLists()clearSearchItemLists.
-
search
public String search() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionDummy method for component cross-compatibility with CMS searches.- Returns:
- Navigation outcome
- Throws:
PresentationExceptionIndexUnreachableExceptionDAOExceptionViewerConfigurationException
-
getEffectiveFilterQuery
-
search
public String search(String filterQuery) throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException Executes the search using already set parameters. Usually called from Pretty URLs.- Parameters:
filterQuery- aStringobject- Returns:
- Navigation outcome
- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
searchSimple
Perform a simple Search Action method for search buttons (simple search).- Specified by:
searchSimplein interfaceSearchInterface- Returns:
- the url to navigate to, or an empty string if naviation is handled internally
-
searchSimple
Action method for search buttons (simple search) with an option to reset search parameters.- Parameters:
resetParameters- a boolean.- Returns:
- Navigation outcome
-
searchSimple
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
simpleSearch.
- Parameters:
search- aSearchInterfaceobject- Returns:
- Navigation outcome
-
searchSimpleResetCollections
Same assearchSimple()but resets the current facets.- Returns:
- Navigation outcome
-
searchSimpleSetFacets
Same asbut sets the current facets to the given stringsearchSimple()- Parameters:
facetString- aStringobject.- Returns:
- Navigation outcome
-
searchAdvanced
Perform an advanced Search- Specified by:
searchAdvancedin interfaceSearchInterface- Returns:
- the url to navigate to, or an empty string if naviation is handled internally
-
searchAdvanced
searchAdvanced.
- Parameters:
resetParameters- a boolean.- Returns:
- Navigation outcome
-
searchDirect
Search using currently set search string- Returns:
- Navigation outcome
-
searchToday
Executes a search for any content tagged with today's month and day.- Returns:
- Navigation outcome
-
resetSearchAction
Action method for the "reset" button in search forms.- Returns:
- Navigation outcome
-
reset
public void reset()Same asresetSearchAction()without the redirect -
resetSearch
Reset the current search including all results and search parameters Alias forresetSearchAction()- Specified by:
resetSearchin interfaceSearchInterface- 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 ifis 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
@Deprecated(since="25.05") public void hitsPerPageListener() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionDeprecated.hitsPerPageListener.
- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
executeSearch
public void executeSearch() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionexecuteSearch.
- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
executeSearch
public void executeSearch(String filterQuery) throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException executeSearch.
- Parameters:
filterQuery- aStringobject- Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.ViewerConfigurationException- if any.
-
setLastUsedSearchPage
public void setLastUsedSearchPage()Set the currentViewerPathas thelastUsedSearchPage. This is where returning to search hit list from record will direct to -
getFinalSolrQuery
getFinalSolrQuery.
- Returns:
- a
Stringobject
-
getFilterQueries
getFilterQueries.
- Returns:
- a
Listobject
-
getCombinedFilterQuery
getCombinedFilterQuery.
- Returns:
- Generated query
-
getActiveSearchType
public int getActiveSearchType()Get the currently active search type. The possible types are defined inSearchHelper- Specified by:
getActiveSearchTypein interfaceSearchInterface- Returns:
- the active search type
-
setActiveSearchType
public void setActiveSearchType(int activeSearchType) Set the search type to use. The possible types are defined inSearchHelper- Specified by:
setActiveSearchTypein interfaceSearchInterface- Parameters:
activeSearchType- a int.
-
resetActiveSearchType
public void resetActiveSearchType()resetActiveSearchType.
-
autocomplete
Return suggestions for autocomplete- Specified by:
autocompletein interfaceSearchInterface- Parameters:
suggest- aStringobject.- Returns:
- suggestions for autocomplete
- Throws:
IndexUnreachableException- if any.
-
isSearchInDcFlag
public boolean isSearchInDcFlag()Return if search is performed only within a DC- Specified by:
isSearchInDcFlagin interfaceSearchInterface- Returns:
- a boolean.
-
isSearchInFacetFieldFlag
Return if search is performed only within a certain facet field- Specified by:
isSearchInFacetFieldFlagin interfaceSearchInterface- Parameters:
fieldName-- Returns:
- a boolean.
-
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
The setter for the invisible search string. Performs all regular settings.- Parameters:
invisibleSearchString- aStringobject.
-
getSearchString
Get the current search string for display- Specified by:
getSearchStringin interfaceSearchInterface- Returns:
- the current search string for display
-
getSearchStringForUrl
Wrapper method for Pretty URL mappings (so that the values is never empty).- Returns:
- a
Stringobject.
-
setSearchStringForUrl
Wrapper method for Pretty URL mappings.- Parameters:
searchString- aStringobject.
-
setSearchString
Set the actual search string Wrapper for setSearchStringKeepCurrentPage() that also resetscurrentPage.- Specified by:
setSearchStringin interfaceSearchInterface- Parameters:
searchString- aStringobject.
-
getExactSearchString
Get the actual search string- Specified by:
getExactSearchStringin interfaceSearchInterface- Returns:
- the actual search string
-
setExactSearchString
Sets the currentsearchStringInternalto 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- aStringobject.
-
setSortString
Set the sorting search string- Specified by:
setSortStringin interfaceSearchInterface- Parameters:
sortString- aStringobject.
-
getSortString
Return the search string for the selected sort option- Specified by:
getSortStringin interfaceSearchInterface- Returns:
- the search string for the selected sort option
-
getSearchSortingOption
Getter for the field
searchSortingOption.- Returns:
- the searchSortingOption
-
setSearchSortingOption
Setter for the field
searchSortingOption.- Parameters:
searchSortingOption- the searchSortingOption to set
-
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
-
getActiveContext
getActiveContext.
- Specified by:
getActiveContextin interfaceSearchInterface- Returns:
- activeResultGroup name; "-" if none set
-
setActiveResultGroup
Setter for the field
activeResultGroup.- Parameters:
activeResultGroup- aSearchResultGroupobject
-
setActiveContext
Depending on configuration settings, sets the given value as the active search result group name and/or active advanced search template.- Specified by:
setActiveContextin interfaceSearchInterface- Parameters:
activeContext- Name of the active context
-
getActiveResultGroupName
getActiveResultGroupName. For URL building, use getActiveContext() instead.
- Returns:
- activeResultGroup name; "-" if none set
-
setActiveResultGroupName
Sets activeResultGroup via the given name.- Parameters:
activeResultGroupName- Name of the active context
-
getAdvancedSearchFieldTemplate
- Returns:
- the advancedSearchFieldTemplate
-
setAdvancedSearchFieldTemplate
- Parameters:
advancedSearchFieldTemplate-
-
mirrorAdvancedSearchCurrentHierarchicalFacets
public void mirrorAdvancedSearchCurrentHierarchicalFacets()Matches the selected collection item in the advanced search to the current value ofcurrentCollection. -
removeRangeFacetAction
removeRangeFacetAction.
- Parameters:
field- aStringobject- Returns:
- Navigation outcome
-
removeFacetAction
removeFacetAction.
- Parameters:
facetQuery- aStringobject.- Returns:
- Navigation outcome
-
getCurrentPage
public int getCurrentPage()Return the current result list page number- Specified by:
getCurrentPagein interfaceSearchInterface- 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:
getHitsCountin interfaceSearchInterface- Returns:
- the total number of hits of the last search
-
setHitsCount
public void setHitsCount(long hitsCount) setHitsCount.
- Parameters:
hitsCount- the hitsCount to set
-
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
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
public BrowseElement getNextElement() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionReturns 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
public BrowseElement getPreviousElement() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionReturns 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
Get a list of all available search filters- Specified by:
getSearchFiltersin interfaceSearchInterface- Returns:
- a list of all available search filters
-
getCurrentSearchFilterString
Return the current search filter as string- Specified by:
getCurrentSearchFilterStringin interfaceSearchInterface- Returns:
- the current search filter as string
-
setCurrentSearchFilterString
Set the current search filter as string SetscurrentSearchFiltervia the given label value.- Specified by:
setCurrentSearchFilterStringin interfaceSearchInterface- Parameters:
searchFilterLabel- aStringobject.
-
resetSearchFilter
public void resetSearchFilter()resetSearchFilter.
-
resetCurrentHitIndex
public void resetCurrentHitIndex()resetCurrentHitIndex.
-
isSortingEnabled
public boolean isSortingEnabled()isSortingEnabled.
- Returns:
- a boolean.
-
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
Listobject. - Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.
-
getAllCollections
Returns drop-down items for all collection names. Convenience method that retrieves the current language fromNavigationHelper. This method shouldn't throw exceptions, otherwise it can cause an IllegalStateException.- Returns:
- a
Listobject.
-
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- aStringobject.- Returns:
- a
Listobject. - Throws:
PresentationException- if any.IndexUnreachableException- if any.DAOException- if any.
-
getAdvancedSearchAllowedFields
getAdvancedSearchAllowedFields.
- Returns:
- List of allowed advanced search fields
-
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 fieldstemplate- aStringobjectaddSearchFilters-- Returns:
- List of allowed advanced search fields
-
getSearchInCurrentItemString
Getter for the field
searchInCurrentItemString.- Returns:
- the searchInCurrentItemString
-
setSearchInCurrentItemString
Setter for the field
searchInCurrentItemString.- Parameters:
searchInCurrentItemString- the searchInCurrentItemString to set
-
getCurrentSearch
Getter for the field
currentSearch.- Returns:
- the currentSearch
-
setCurrentSearch
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
saveSearchAction.
- Returns:
- a
Stringobject. - Throws:
DAOException- if any.
-
getRssUrl
getRssUrl.
- Returns:
- URL to the RSS feed for the current search
- Throws:
ViewerConfigurationException- if any.
-
isSearchSavingEnabled
public boolean isSearchSavingEnabled()isSearchSavingEnabled.
- Returns:
- a boolean.
-
executeSavedSearchAction
executeSavedSearchAction.
-
exportSearchAsRisAction
exportSearchAsRisAction.
- Returns:
- a
Stringobject. - Throws:
IndexUnreachableException- if any.
-
exportSearchAsExcelAction
exportSearchAsExcelAction.
- Returns:
- a
Stringobject. - 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
Getter for the field
advancedSearchQueryInfo.- Returns:
- the advancedSearchQueryInfo
-
getFacets
List all currentSearchFacets- Specified by:
getFacetsin interfaceSearchInterface- Returns:
- all current
SearchFacets
-
isDownloadReady
isDownloadReady.
- Returns:
- a
Futureobject.
-
getTotalNumberOfVolumes
getTotalNumberOfVolumes.
- Returns:
- a long.
- Throws:
IndexUnreachableException- if any.PresentationException- if any.
-
getSearchUrl
Returns the proper search URL part for the current search type.- Returns:
- a
Stringobject.
-
getLastPage
public int getLastPage()Return the last result list page number- Specified by:
getLastPagein interfaceSearchInterface- Returns:
- the last result list page number
-
getStructElement
public StructElement getStructElement(String pi) throws IndexUnreachableException, PresentationException getStructElement.
- Parameters:
pi- aStringobject.- Returns:
- a
StructElementobject. - Throws:
IndexUnreachableException- if any.PresentationException- if any.
-
getCurrentSearchUrlRoot
Return the base url of the current search page, without any search parameters- Specified by:
getCurrentSearchUrlRootin interfaceSearchInterface- Returns:
- the base url of the current search page, without any search parameters
-
getCurrentSearchUrlPart
getCurrentSearchUrlPart.
- Returns:
- Parameter string for pretty:search5 URLs.
-
updateFacetItem
updateFacetItem.
- Parameters:
field- aStringobject.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- aStringobject.subQuery- aStringobject.resultLimit- aIntegerobject.reverseOrder- aBooleanobject.- Returns:
- a
Listobject. - 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:
isSearchPerformedin interfaceSearchInterface- 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:
isExplicitSearchPerformedin interfaceSearchInterface- Returns:
- if a search has been triggered by the user and not yet been reset
-
setFirstQueryItemValue
setFirstQueryItemValue.
- Parameters:
value- aStringobject.
-
getFirstQueryItemValue
public void getFirstQueryItemValue()getFirstQueryItemValue.
-
setBookmarkListName
setBookmarkListName.
- Parameters:
name- aStringobject.
-
getBookmarkListName
getBookmarkListName.
- Returns:
- a
Stringobject.
-
getProximitySearchDistance
public int getProximitySearchDistance()Getter for the field
proximitySearchDistance.- Returns:
- a int
-
searchInRecord
searchInRecord.
-
searchInField
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:
hasGeoLocationHitsin interfaceSearchInterface- Returns:
- a boolean
-
getHitsLocations
getHitsLocations.
- Returns:
- a
Listobject
-
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
getHitsMap.
- Specified by:
getHitsMapin interfaceSearchInterface- Returns:
- a
GeoMapobject
-
facetifyField
facetifyField.
- Parameters:
fieldName- aStringobject- Returns:
- Facet variant of the given fieldName
-
getFieldFacetValues
getFieldFacetValues.
- Parameters:
field- aStringobjectnum- 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- aStringobjectnum- a intfilterQuery- aStringobject- Returns:
- List of facet values for the given field
- Throws:
IndexUnreachableException
-
getSearchSortingOptions
getSearchSortingOptions.
- Parameters:
language- aStringobject- Returns:
- List of sorting options for the given language
-
getQueryResultCount
public long getQueryResultCount(String query) throws IndexUnreachableException, PresentationException getQueryResultCount.
- Parameters:
query- aStringobject- Returns:
- Number of hits for the given query
- Throws:
IndexUnreachableExceptionPresentationException
-
getFinalSolrQueryEscaped
getFinalSolrQueryEscaped.
- Returns:
- URL-encoded final query
-
getCombinedFilterQueryEscaped
getCombinedFilterQueryEscaped.
- Returns:
- URL-encoded combined filter query
-
getFilterQuery
-
setFilterQuery
-
getLastUsedSearchUrl
The url of the viewer page loaded when the last search operation was performed, stored inglastUsedSearchPageor the url of the default search or searchAdvanved page depending on the state of this bean- Returns:
- a URL string
-
changeSorting
action to execute to change sort sort order of hits- Specified by:
changeSortingin interfaceSearchInterface- Returns:
- Navigation outcome
- Throws:
IOException
-
getHttpRequest
public jakarta.servlet.http.HttpServletRequest getHttpRequest()
-