Class DefaultSearch
- java.lang.Object
-
- com.atlassian.confluence.search.v2.AbstractSearch
-
- com.atlassian.confluence.search.v2.DefaultSearch
-
- All Implemented Interfaces:
ISearch
public class DefaultSearch extends AbstractSearch
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.search.v2.AbstractSearch
indices, limit, query, searchAfter, sort, startOffset
-
-
Constructor Summary
Constructors Constructor Description DefaultSearch(EnumSet<SearchIndex> indexes, SearchQuery query, SearchSort sort, int startOffset, int limit)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.7.0.DefaultSearch(List<Index> indices, @NonNull SearchQuery query, SearchSort sort, int startOffset, int limit, List<String> searchAfter)
Support searchAfter parameter in OpenSearchDefaultSearch(List<Index> indices, SearchQuery query, SearchSort sort)
DefaultSearch(List<Index> indices, SearchQuery query, SearchSort sort, int startOffset, int limit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISearch
withIndices(List<Index> indices)
This method is only applicable forCustomSearch
andDefaultSearch
A class must implement this method.ISearch
withQuery(SearchQuery query)
A class must implement this method.DefaultSearch
withSearchAfter(@NonNull List<String> searchAfter)
This method is only relevant to OpenSearch.-
Methods inherited from class com.atlassian.confluence.search.v2.AbstractSearch
equals, getIndices, getLimit, getQuery, getSearchAfter, getSearchIndexes, getSort, getStartOffset, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.search.v2.ISearch
getHighlight, getSearchType, isExplain
-
-
-
-
Constructor Detail
-
DefaultSearch
@Deprecated(since="8.7.0", forRemoval=true) public DefaultSearch(EnumSet<SearchIndex> indexes, SearchQuery query, SearchSort sort, int startOffset, int limit)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.7.0. UseDefaultSearch(List, SearchQuery, SearchSort, int, int)
instead
-
DefaultSearch
public DefaultSearch(List<Index> indices, SearchQuery query, SearchSort sort)
- Since:
- 8.7.0
-
DefaultSearch
public DefaultSearch(List<Index> indices, SearchQuery query, SearchSort sort, int startOffset, int limit)
- Since:
- 8.7.0
-
DefaultSearch
public DefaultSearch(List<Index> indices, @NonNull SearchQuery query, SearchSort sort, int startOffset, int limit, List<String> searchAfter)
Support searchAfter parameter in OpenSearch- Since:
- 8.7.0
-
-
Method Detail
-
withSearchAfter
public DefaultSearch withSearchAfter(@NonNull List<String> searchAfter)
Description copied from interface:ISearch
This method is only relevant to OpenSearch. A class must implement this method. Otherwise, it will have no effect on the search results.- Parameters:
searchAfter
- the searchAfter parameter- Returns:
- a new
ISearch
containing the searchAfter parameter - Since:
- 8.7.0
-
withIndices
public ISearch withIndices(List<Index> indices)
Description copied from interface:ISearch
This method is only applicable forCustomSearch
andDefaultSearch
A class must implement this method. Otherwise, it will have no effect on the search results.- Parameters:
indices
- the indices to search from- Returns:
- a new
ISearch
containing the new indices
-
withQuery
public ISearch withQuery(SearchQuery query)
Description copied from interface:ISearch
A class must implement this method. Otherwise, UnsupportedOperationException will be thrown.- Parameters:
query
- the query to be added to the search object- Returns:
- a new
ISearch
containing the new query
-
-