Interface XContentFieldFilter


public interface XContentFieldFilter
A filter that filter fields away from source
  • Method Details

    • apply

      BytesReference apply(BytesReference sourceBytes, @Nullable org.elasticsearch.xcontent.XContentType xContentType) throws IOException
      filter source in BytesReference format and in XContentType content type note that xContentType may be null in some case, we should guess xContentType from sourceBytes in such cases
      Throws:
      IOException
    • newFieldFilter

      static XContentFieldFilter newFieldFilter(String[] includes, String[] excludes)
      Construct XContentFieldFilter using given includes and excludes
      Parameters:
      includes - fields to keep, wildcard supported
      excludes - fields to remove, wildcard supported
      Returns:
      filter that filter XContent with given includes and excludes