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 hitsvoid
clearSearchItemLists.executeSavedSearchAction
(Search search) executeSavedSearchAction.void
executeSearch.void
executeSearch
(String filterQuery) executeSearch.exportSearchAsExcelAction.exportSearchAsRisAction.facetifyField
(String fieldName) facetifyField.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.getActiveResultGroupName.int
Get 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.int
Getter for the fieldcurrentHitIndex
.int
getCurrentHitIndexDisplay.int
Return 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 stringDeprecated.List all currentSearchFacets
getFieldFacetValues
(String field, int num) getFieldFacetValues.getFieldFacetValues
(String field, int num, String filterQuery) getFieldFacetValues.getFilterQueries.getFinalSolrQuery.getFinalSolrQueryEscaped.void
getFirstQueryItemValue.int
Getter for the fieldhitIndexOperand
.long
get total number of hits of the last searchgetHitsLocations.getHitsMap.int
Getter for the fieldhitsPerPage
.Getter for the invisible (empty) search string.int
Return the last result list page numberThe url of the viewer page loaded when the last search operation was performed, stored inglastUsedSearchPage
or 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.int
Getter for the fieldproximitySearchDistance
.long
getQueryResultCount
(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.long
getTotalNumberOfVolumes.boolean
hasGeoLocationHits.void
hitsPerPageListener.void
increaseCurrentHitIndex.void
init()
init.boolean
isDisplayResultGroupNames.isDownloadReady.boolean
Check if a search has been triggered by the user and not yet been resetboolean
isFuzzySearchEnabled.boolean
isHitsPerPageSetterCalled.boolean
Return if search is performed only within a DCboolean
isSearchInFacetFieldFlag
(String fieldName) Return if search is performed only within a certain facet fieldboolean
Check if a search has been performed and any results are to be excepted (provided the search yielded any)boolean
isSearchSavingEnabled.boolean
Display the geo facet map if there are any hits available with geo coordinatesboolean
isSolrIndexReachable.boolean
isSortingEnabled.void
Matches the selected collection item in the advanced search to the current value ofcurrentCollection
.Deprecated.No longer relevant for current implementationremoveFacetAction
(String facetQuery) removeFacetAction.removeRangeFacetAction
(String field) removeRangeFacetAction.void
reset()
Same asresetSearchAction()
without the redirectvoid
resetActiveSearchType.protected void
Resets search options for the advanced search.void
resetCurrentHitIndex.Reset the current search including all results and search parametersAction method for the "reset" button in search forms.void
resetSearchFilter.void
Resets general search options and type specific options for currently unused types.void
resetSearchParameters
(boolean resetAllSearchTypes) resetSearchParameters.void
resetSearchParameters
(boolean resetAllSearchTypes, boolean resetCurrentPage) Resets general search options and type specific options for currently unused types (all options ifis true). void
Resets variables that hold search result data.protected void
Resets 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 stringsearchInRecord
(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 as
but sets the current facets to the given stringsearchSimple()
Executes a search for any content tagged with today's month and day.void
setActiveResultGroup
(SearchResultGroup activeResultGroup) Setter for the fieldactiveResultGroup
.void
setActiveResultGroupName
(String activeResultGroupName) setActiveResultGroupName.void
setActiveSearchType
(int activeSearchType) Set the search type to use.void
setAdvancedQueryItemsReset
(boolean reset) "Setter" for resetting the query item list via a f:setPropertyActionListener.void
setBookmarkListName
(String name) setBookmarkListName.void
setBookmarkListName.void
setCurrentPage
(int currentPage) Setter for the fieldcurrentPage
.void
setCurrentSearch
(Search currentSearch) Setter for the fieldcurrentSearch
.void
setCurrentSearchFilterString
(String searchFilterLabel) Set the current search filter as stringvoid
setExactSearchString
(String inSearchString) Sets the currentsearchStringInternal
to the given query, without parsing it like the regular setSearchString() method.void
setFirstQueryItemValue
(String value) setFirstQueryItemValue.void
setFuzzySearchEnabled
(boolean fuzzySearchEnabled) Setter for the fieldfuzzySearchEnabled
.void
setHitIndexOperand
(int hitIndexOperand) Setter for the fieldhitIndexOperand
.void
setHitsCount
(long hitsCount) setHitsCount.void
setHitsPerPage
(int hitsPerPage) Setter for the fieldhitsPerPage
.void
setHitsPerPageNoTrigger
(int hitsPerPage) Like setHitsPerPage() but doesn't trigger the boolean.void
setHitsPerPageSetterCalled
(boolean hitsPerPageSetterCalled) Setter for the fieldhitsPerPageSetterCalled
.void
setInvisibleSearchString
(String invisibleSearchString) The setter for the invisible search string.void
Set the currentViewerPath
as thelastUsedSearchPage
.void
setNavigationHelper
(NavigationHelper navigationHelper) Required setter for ManagedProperty injection for unit tests.void
setSearchInCurrentItemString
(String searchInCurrentItemString) Setter for the fieldsearchInCurrentItemString
.void
setSearchSortingOption
(SearchSortingOption searchSortingOption) Setter for the fieldsearchSortingOption
.void
setSearchString
(String searchString) Set the actual search stringvoid
setSearchStringForUrl
(String searchString) Wrapper method for Pretty URL mappings.void
setSortString
(String sortString) Set the sorting search stringsimpleSearch
(SearchInterface search) simpleSearch.void
updateFacetItem
(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:
PresentationException
IndexUnreachableException
DAOException
ViewerConfigurationException
-
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
- aString
object- 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:
searchSimple
in 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
- aSearchInterface
object- Returns:
- Navigation outcome
-
searchSimpleResetCollections
Same assearchSimple()
but resets the current facets.- Returns:
- Navigation outcome
-
searchSimpleSetFacets
Same as
but sets the current facets to the given stringsearchSimple()
- Parameters:
facetString
- aString
object.- Returns:
- Navigation outcome
-
searchAdvanced
Perform an advanced Search- Specified by:
searchAdvanced
in 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:
resetSearch
in 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
public void hitsPerPageListener() throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationExceptionhitsPerPageListener.
- 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
- aString
object- Throws:
PresentationException
- if any.IndexUnreachableException
- if any.DAOException
- if any.ViewerConfigurationException
- if any.
-
setLastUsedSearchPage
public void setLastUsedSearchPage()Set the currentViewerPath
as thelastUsedSearchPage
. This is where returning to search hit list from record will direct to -
getFinalSolrQuery
getFinalSolrQuery.
- Returns:
- a
String
object
-
getFilterQueries
getFilterQueries.
- Returns:
- a
List
object
-
getCombinedFilterQuery
getCombinedFilterQuery.
- Returns:
- Generated query
-
getActiveSearchType
public int getActiveSearchType()Get the currently active search type. The possible types are defined inSearchHelper
- Specified by:
getActiveSearchType
in 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:
setActiveSearchType
in interfaceSearchInterface
- Parameters:
activeSearchType
- a int.
-
resetActiveSearchType
public void resetActiveSearchType()resetActiveSearchType.
-
autocomplete
Return suggestions for autocomplete- Specified by:
autocomplete
in interfaceSearchInterface
- Parameters:
suggest
- aString
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 interfaceSearchInterface
- Returns:
- a boolean.
-
isSearchInFacetFieldFlag
Return if search is performed only within a certain facet field- Specified by:
isSearchInFacetFieldFlag
in interfaceSearchInterface
- 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
- aString
object.
-
getSearchString
Get the current search string for display- Specified by:
getSearchString
in interfaceSearchInterface
- Returns:
- the current search string for display
-
getSearchStringForUrl
Wrapper method for Pretty URL mappings (so that the values is never empty).- Returns:
- a
String
object.
-
setSearchStringForUrl
Wrapper method for Pretty URL mappings.- Parameters:
searchString
- aString
object.
-
setSearchString
Set the actual search string Wrapper for setSearchStringKeepCurrentPage() that also resetscurrentPage
.- Specified by:
setSearchString
in interfaceSearchInterface
- Parameters:
searchString
- aString
object.
-
getExactSearchString
Get the actual search string- Specified by:
getExactSearchString
in interfaceSearchInterface
- Returns:
- the actual search string
-
setExactSearchString
Sets the currentsearchStringInternal
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
- aString
object.
-
getExactSearchStringResetGui
Deprecated.JSF expects a getter, too.- Returns:
- a
String
object.
-
setSortString
Set the sorting search string- Specified by:
setSortString
in interfaceSearchInterface
- Parameters:
sortString
- aString
object.
-
getSortString
Return the search string for the selected sort option- Specified by:
getSortString
in 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
-
getActiveResultGroupName
getActiveResultGroupName.
- Returns:
- activeResultGroup name; "-" if none set
-
setActiveResultGroup
Setter for the field
activeResultGroup
.- Parameters:
activeResultGroup
- aSearchResultGroup
object
-
setActiveResultGroupName
setActiveResultGroupName.
- Parameters:
activeResultGroupName
- aString
object
-
mirrorAdvancedSearchCurrentHierarchicalFacets
public void mirrorAdvancedSearchCurrentHierarchicalFacets()Matches the selected collection item in the advanced search to the current value ofcurrentCollection
. -
removeChronologyFacetAction
Deprecated.No longer relevant for current implementationremoveChronologyFacetAction.
- Returns:
- Navigation outcome
-
removeRangeFacetAction
removeRangeFacetAction.
- Parameters:
field
- aString
object- Returns:
- Navigation outcome
-
removeFacetAction
removeFacetAction.
- Parameters:
facetQuery
- aString
object.- Returns:
- Navigation outcome
-
getCurrentPage
public int getCurrentPage()Return the current result list page number- Specified by:
getCurrentPage
in 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:
getHitsCount
in 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:
getSearchFilters
in interfaceSearchInterface
- Returns:
- a list of all available search filters
-
getCurrentSearchFilterString
Return the current search filter as string- Specified by:
getCurrentSearchFilterString
in interfaceSearchInterface
- Returns:
- the current search filter as string
-
setCurrentSearchFilterString
Set the current search filter as string SetscurrentSearchFilter
via the given label value.- Specified by:
setCurrentSearchFilterString
in interfaceSearchInterface
- Parameters:
searchFilterLabel
- aString
object.
-
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
List
object. - 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
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
- aString
object.- Returns:
- a
List
object. - 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
- aString
objectaddSearchFilters
-- 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
String
object. - 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
String
object. - Throws:
IndexUnreachableException
- if any.
-
exportSearchAsExcelAction
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
Getter for the field
advancedSearchQueryInfo
.- Returns:
- the advancedSearchQueryInfo
-
getFacets
List all currentSearchFacets
- Specified by:
getFacets
in interfaceSearchInterface
- Returns:
- all current
SearchFacets
-
isDownloadReady
isDownloadReady.
- Returns:
- a
Future
object.
-
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
String
object.
-
getLastPage
public int getLastPage()Return the last result list page number- Specified by:
getLastPage
in interfaceSearchInterface
- Returns:
- the last result list page number
-
getStructElement
public StructElement getStructElement(String pi) throws IndexUnreachableException, PresentationException getStructElement.
- Parameters:
pi
- aString
object.- Returns:
- a
StructElement
object. - Throws:
IndexUnreachableException
- if any.PresentationException
- if any.
-
getCurrentSearchUrlRoot
Return the base url of the current search page, without any search parameters- Specified by:
getCurrentSearchUrlRoot
in 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
- aString
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
- aString
object.subQuery
- aString
object.resultLimit
- aInteger
object.reverseOrder
- aBoolean
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 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:
isExplicitSearchPerformed
in interfaceSearchInterface
- Returns:
- if a search has been triggered by the user and not yet been reset
-
setFirstQueryItemValue
setFirstQueryItemValue.
- Parameters:
value
- aString
object.
-
getFirstQueryItemValue
public void getFirstQueryItemValue()getFirstQueryItemValue.
-
setBookmarkListName
setBookmarkListName.
- Parameters:
name
- aString
object.
-
getBookmarkListName
getBookmarkListName.
- Returns:
- a
String
object.
-
getProximitySearchDistance
public int getProximitySearchDistance()Getter for the field
proximitySearchDistance
.- Returns:
- a int
-
searchInRecord
searchInRecord.
-
isSolrIndexReachable
public boolean isSolrIndexReachable()isSolrIndexReachable.
- Returns:
- true if Solr ping successful; false otherwise
-
hasGeoLocationHits
public boolean hasGeoLocationHits()hasGeoLocationHits.
- Specified by:
hasGeoLocationHits
in interfaceSearchInterface
- Returns:
- a boolean
-
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
getHitsMap.
- Specified by:
getHitsMap
in interfaceSearchInterface
- Returns:
- a
GeoMap
object
-
facetifyField
facetifyField.
- Parameters:
fieldName
- aString
object- Returns:
- Facet variant of the given fieldName
-
getFieldFacetValues
getFieldFacetValues.
- Parameters:
field
- aString
objectnum
- 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
- aString
objectnum
- a intfilterQuery
- aString
object- Returns:
- List of facet values for the given field
- Throws:
IndexUnreachableException
-
getSearchSortingOptions
getSearchSortingOptions.
- Parameters:
language
- aString
object- Returns:
- List of sorting options for the given language
-
getQueryResultCount
public long getQueryResultCount(String query) throws IndexUnreachableException, PresentationException getQueryResultCount.
- Parameters:
query
- aString
object- Returns:
- Number of hits for the given query
- Throws:
IndexUnreachableException
PresentationException
-
getFinalSolrQueryEscaped
getFinalSolrQueryEscaped.
- Returns:
- URL-encoded final query
-
getCombinedFilterQueryEscaped
getCombinedFilterQueryEscaped.
- Returns:
- URL-encoded combined filter query
-
getLastUsedSearchUrl
The url of the viewer page loaded when the last search operation was performed, stored inglastUsedSearchPage
or 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:
changeSorting
in interfaceSearchInterface
- Returns:
- Navigation outcome
- Throws:
IOException
-