Class Searcher

java.lang.Object
de.cxp.ocs.elasticsearch.Searcher

public class Searcher extends Object
  • Constructor Details

    • Searcher

      public Searcher(org.elasticsearch.client.RestHighLevelClient restClient, SearchContext searchContext, io.micrometer.core.instrument.MeterRegistry registry, SearchPlugins plugins)
  • Method Details

    • find

      public SearchResult find(InternalSearchParams parameters) throws IOException
      Throws:
      IOException
    • find

      public SearchResult find(InternalSearchParams parameters, Map<String,Object> searchMetaData) throws IOException
      Compute result based on the given parameters. The searchMetaData are attached to the search-result, so by that you can pass additional information into the result or use it for debugging in case of an error.
      Parameters:
      parameters - the parsed and validated parameters
      searchMetaData - in case an exception occurs, this meta data might already be partially filled with data which might be useful for debuggingqueryContext.variantSortings
      Returns:
      a search result according to the given parameters
      Throws:
      IOException - in case of connection errors
    • queryStringFind

      public SearchResult queryStringFind(InternalSearchParams parameters, Map<String,Float> fieldWeights) throws IOException
      Throws:
      IOException
    • executeSearchRequest

      public org.elasticsearch.action.search.SearchResponse executeSearchRequest(org.elasticsearch.search.builder.SearchSourceBuilder searchSourceBuilder) throws IOException
      Throws:
      IOException