/** * Sets the sort order used for sorting the results of s search.<p> * * @param sortOrder the sort order to set */ public void setSortOrder(Sort sortOrder) { m_parameters.setSort(sortOrder); resetLastResult(); }
/** * Sets the current result page.<p> * * Works with jsp bean mechanism for request parameter "searchPage" * that is generated here for page links.<p> * * @param page the current result page */ public void setSearchPage(int page) { m_parameters.setSearchPage(page); resetLastResult(); }
/** * Gets the name of the current search index.<p> * * @return the name of the index */ public String getIndex() { return m_parameters.getSearchIndex().getName(); }
/** * Returns the key words.<p> * * @return the key words * * @Deprecated use {@link #getField(String)} instead with the name of the field, * for example use {@link org.opencms.search.fields.CmsLuceneField#FIELD_KEYWORDS} to get the keywords (if available) */ public String getKeywords() { return getField(CmsSearchField.FIELD_KEYWORDS); }
/** * Sets the number of matches per page.<p> * * @param matches the number of matches per page */ public void setMatchesPerPage(int matches) { m_parameters.setMatchesPerPage(matches); resetLastResult(); }
/** * @see java.lang.Object#toString() */ @Override public String toString() { return formatCategoryMap(getCategoryCountResult()); }
/** * Returns the minimum creation date a resource must have to be included in the search result.<p> * * @return the minimum creation date a resource must have to be included in the search result */ public long getMinDateCreated() { return m_parameters.getMinDateCreated(); }
/** * Gets the current search query.<p> * * @return the current query string or null if no query was set before */ public String getQuery() { return m_parameters.getQuery(); }
/** * Returns a cached Lucene term query filter for the given field and terms.<p> * * @param field the field to use * @param terms the term to use * * @return a cached Lucene term query filter for the given field and terms */ protected Filter getMultiTermQueryFilter(String field, String terms) { return getMultiTermQueryFilter(field, terms, null); }
/** * Closes the index searcher for this index.<p> * * @see #indexSearcherOpen(String) */ protected synchronized void indexSearcherClose() { indexSearcherClose(m_indexSearcher); }
/** * Sets the maximum number of pages which should be shown.<p> * * Enter an odd value to achieve a nice, "symmetric" output.<p> * * @param value the maximum number of pages which should be shown */ public void setDisplayPages(int value) { m_parameters.setDisplayPages(value); }
/** * Resumes offline indexing if it was paused.<p> */ public void resumeOfflineIndexing() { if (m_offlineUpdateFrequency == Long.MAX_VALUE) { setOfflineUpdateFrequency( m_configuredOfflineIndexingFrequency > 0 ? m_configuredOfflineIndexingFrequency : DEFAULT_OFFLINE_UPDATE_FREQNENCY); } }
/** * Gets the number of matches displayed on each page.<p> * * @return matches per result page */ public int getMatchesPerPage() { return m_parameters.getMatchesPerPage(); }
/** * @see org.opencms.search.I_CmsSearchDocument#getType() */ public String getType() { return getFieldValueAsString(CmsSearchField.FIELD_TYPE); }
/** * Delegator.<p> * * {@link I_CmsSearchDocument#getFieldValueAsDate(String)} * * @param fieldName the field name to get the value for * * @return the value */ public Date getDateField(String fieldName) { return m_doc.getFieldValueAsDate(fieldName); }
/** * Sets the current result page.<p> * * Works with jsp bean mechanism for request parameter "searchPage" * that is generated here for page links.<p> * * @param page the current result page */ public void setSearchPage(int page) { m_parameters.setSearchPage(page); resetLastResult(); }
/** * Gets the name of the current search index.<p> * * @return the name of the index */ public String getIndex() { return m_parameters.getSearchIndex().getName(); }
/** * Sets the sort order used for sorting the results of s search.<p> * * @param sortOrder the sort order to set */ public void setSortOrder(Sort sortOrder) { m_parameters.setSort(sortOrder); resetLastResult(); }
/** * Sets the number of matches per page.<p> * * @param matches the number of matches per page */ public void setMatchesPerPage(int matches) { m_parameters.setMatchesPerPage(matches); resetLastResult(); }
/** * Returns a cached Lucene term query filter for the given field and terms.<p> * * @param field the field to use * @param terms the term to use * * @return a cached Lucene term query filter for the given field and terms */ protected Filter getMultiTermQueryFilter(String field, List<String> terms) { return getMultiTermQueryFilter(field, null, terms); }