Class DefaultSearchWithToken

  • All Implemented Interfaces:
    ISearch, SearchWithToken

    @Deprecated(since="8.7.0",
                forRemoval=true)
    public class DefaultSearchWithToken
    extends Object
    implements SearchWithToken
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 8.7.0
    Usage of this class is discouraged since we are replacing Lucene with OpenSearch
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultSearchWithToken​(ISearch delegate, long searchToken)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      Optional<HightlightParams> getHighlight()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Provides indication as well as pre/post tag whether query terms should be highlighted in title and body of a search result.
      List<Index> getIndices()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      int getLimit()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      @NonNull SearchQuery getQuery()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      List<String> getSearchAfter()
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is only relevant to OpenSearch.
      EnumSet<SearchIndex> getSearchIndexes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      IMPORTANT: Use the new getIndices method instead.
      long getSearchToken()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      String getSearchType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns type of search e.g.
      SearchSort getSort()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      int getStartOffset()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      boolean isExplain()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      ISearch withIndices​(List<Index> indices)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is only applicable for CustomSearch and DefaultSearch A class must implement this method.
      ISearch withQuery​(SearchQuery query)
      Deprecated, for removal: This API element is subject to removal in a future version.
      A class must implement this method.
      ISearch withSearchAfter​(List<String> searchAfter)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method is only relevant to OpenSearch.
    • Constructor Detail

      • DefaultSearchWithToken

        public DefaultSearchWithToken​(ISearch delegate,
                                      long searchToken)
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • getSearchToken

        public long getSearchToken()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getSearchToken in interface SearchWithToken
        Returns:
        a search token that allows additional searching to be performed against a specific version of the index (perhaps older version).
      • getQuery

        public @NonNull SearchQuery getQuery()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getQuery in interface ISearch
        Returns:
        the non-null query component of the search
      • getSort

        public SearchSort getSort()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getSort in interface ISearch
        Returns:
        the sort component of the search
      • getStartOffset

        public int getStartOffset()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getStartOffset in interface ISearch
        Returns:
        the start offset (0 based).
      • getLimit

        public int getLimit()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getLimit in interface ISearch
        Returns:
        the maximum page size (positive).
      • getSearchType

        public String getSearchType()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: ISearch
        Returns type of search e.g. SiteSearch, RecentUpdate, NetworkFeed, BlogUpdate, which can be used by search manager to switch between different implementations to support incremental roll out.
        Specified by:
        getSearchType in interface ISearch
        Returns:
        type of search
      • isExplain

        public boolean isExplain()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        isExplain in interface ISearch
      • getSearchIndexes

        public EnumSet<SearchIndex> getSearchIndexes()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: ISearch
        IMPORTANT: Use the new getIndices method instead. Specifies which indexes should be targeted for this particular search.
        Specified by:
        getSearchIndexes in interface ISearch
      • getIndices

        public List<Index> getIndices()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Specified by:
        getIndices in interface ISearch
        Returns:
        a list of indexes should be targeted
      • getSearchAfter

        public List<String> getSearchAfter()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: ISearch
        This method is only relevant to OpenSearch. It does not have any effect if querying against Lucene.
        Specified by:
        getSearchAfter in interface ISearch
        Returns:
        a list of sorted field values
      • withSearchAfter

        public ISearch withSearchAfter​(List<String> searchAfter)
        Deprecated, for removal: This API element is subject to removal in a future version.
        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.
        Specified by:
        withSearchAfter in interface ISearch
        Parameters:
        searchAfter - the searchAfter parameter
        Returns:
        a new ISearch containing the searchAfter parameter
      • withIndices

        public ISearch withIndices​(List<Index> indices)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: ISearch
        This method is only applicable for CustomSearch and DefaultSearch A class must implement this method. Otherwise, it will have no effect on the search results.
        Specified by:
        withIndices in interface ISearch
        Parameters:
        indices - the indices to search from
        Returns:
        a new ISearch containing the new indices
      • withQuery

        public ISearch withQuery​(SearchQuery query)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: ISearch
        A class must implement this method. Otherwise, UnsupportedOperationException will be thrown.
        Specified by:
        withQuery in interface ISearch
        Parameters:
        query - the query to be added to the search object
        Returns:
        a new ISearch containing the new query