Class SearchRequestAttributesExtractor

java.lang.Object
org.elasticsearch.action.search.SearchRequestAttributesExtractor

public final class SearchRequestAttributesExtractor extends Object
Used to introspect a search request and extract metadata from it around the features it uses. Given that the purpose of this class is to extract metrics attributes, it should do its best to extract the minimum set of needed information without hurting performance, and without ever breaking: if something goes wrong around extracting attributes, it should skip extracting them as opposed to failing the search.
  • Field Details

    • SYSTEM_THREAD_ATTRIBUTE_NAME

      public static final String SYSTEM_THREAD_ATTRIBUTE_NAME
      See Also:
    • SEARCH_SCROLL_ATTRIBUTES

      public static final Map<String,Object> SEARCH_SCROLL_ATTRIBUTES
  • Method Details

    • extractAttributes

      public static Map<String,Object> extractAttributes(SearchRequest searchRequest, String[] localIndices)
      Introspects the provided search request and extracts metadata from it about some of its characteristics.
    • extractAttributes

      public static Map<String,Object> extractAttributes(ShardSearchRequest shardSearchRequest, Long rangeTimestampFrom, long nowInMillis)
      Introspects the provided shard search request and extracts metadata from it about some of its characteristics.