Interface ISearch.Builder<SEARCH extends ISearch>

Type Parameters:
SEARCH - the type of search object that this builder creates
All Known Implementing Classes:
AbstractSearch.AbstractBuilder, ChangesSearch.Builder, ContentSearch.Builder, DecoratorSearchBuilder, DefaultSearch.Builder
Enclosing interface:
ISearch

public static interface ISearch.Builder<SEARCH extends ISearch>
Builder interface to create new search instance with the specified values
Since:
9.0
  • Method Details

    • indices

      default ISearch.Builder<SEARCH> indices(Index... indices)
      Specifies the targeted indexes
      Parameters:
      indices -
      Returns:
      the current builder
    • indices

      ISearch.Builder<SEARCH> indices(List<Index> indices)
      Specifies the targeted indexes
      Parameters:
      indices -
      Returns:
      the current builder
    • query

    • sort

      Specifies the sort component of the search
      Parameters:
      sort -
      Returns:
      the current builder
    • startOffset

      ISearch.Builder<SEARCH> startOffset(int startOffset)
      Specifies the start offset (0 based).
      Parameters:
      startOffset -
      Returns:
      the current builder
    • limit

      ISearch.Builder<SEARCH> limit(int limit)
      Specifies the maximum page size (positive).
      Parameters:
      limit -
      Returns:
      the current builder
    • generatesToken

      ISearch.Builder<SEARCH> generatesToken(boolean generatesToken)
      Specifies whether the resulting SearchResults.getNextPageSearch() will be generated with a token. A search token allows additional searching to be performed against a specific version of the index.

      Note: for backward compatibility reason, this value only applies to OpenSearch, since it's costly to always generate a token for every search request. On Lucene, this value is currently ignored, i.e. it will continue to generate a token for every search request. This may change in the future, so if you require a token, make sure to set this to true.

      Parameters:
      generatesToken -
      Returns:
      the current builder
      See Also:
    • build

      SEARCH build()
      Returns:
      a new instance of ISearch.Builder