class_docstr: Stores Documents to be used by the components of a Pipeline.
  
  Classes implementing this protocol often store the documents permanently and allow specialized components to
  perform retrieval on them, either by embedding, by keyword, hybrid, and so on, depending on the backend used.
  
  In order to retrieve documents, consider using a Retriever that supports the DocumentStore implementation that
  you're using.
docstr: Returns the documents that match the filters provided.
  
  Filters are defined as nested dictionaries that can be of two types:
  - Comparison
  - Logic
  
  Comparison dictionaries must contain the keys:
  
  - `field`
  - `operator`
  - `value`
  
  Logic dictionaries must contain the keys:
  
  - `operator`
  - `conditions`
  
  The `conditions` key must be a list of dictionaries, either of type Comparison or Logic.
  
  The `operator` value in Comparison dictionaries must be one of:
  
  - `==`
  - `!=`
  - `>`
  - `>=`
  - `<`
  - `<=`
  - `in`
  - `not in`
  
  The `operator` values in Logic dictionaries must be one of:
  
  - `NOT`
  - `OR`
  - `AND`
  
  
  A simple filter:
  ```python
  filters = {"field": "meta.type", "operator": "==", "value": "article"}
  ```
  
  A more complex filter:
  ```python
  filters = {
      "operator": "AND",
      "conditions": [
          {"field": "meta.type", "operator": "==", "value": "article"},
          {"field": "meta.date", "operator": ">=", "value": 1420066800},
          {"field": "meta.date", "operator": "<", "value": 1609455600},
          {"field": "meta.rating", "operator": ">=", "value": 3},
          {
              "operator": "OR",
              "conditions": [
                  {"field": "meta.genre", "operator": "in", "value": ["economy", "politics"]},
                  {"field": "meta.publisher", "operator": "==", "value": "nytimes"},
              ],
          },
      ],
  }
  
  :param filters: the filters to apply to the document list.
  :return: a list of Documents that match the given filters.
code: def filter_documents(
      self, filters: Optional[Dict[str, Any]] = None
  ) -> List[Document]:
      """
      Returns the documents that match the filters provided.
  
      Filters are defined as nested dictionaries that can be of two types:
      - Comparison
      - Logic
  
      Comparison dictionaries must contain the keys:
  
      - `field`
      - `operator`
      - `value`
  
      Logic dictionaries must contain the keys:
  
      - `operator`
      - `conditions`
  
      The `conditions` key must be a list of dictionaries, either of type Comparison or Logic.
  
      The `operator` value in Comparison dictionaries must be one of:
  
      - `==`
      - `!=`
      - `>`
      - `>=`
      - `<`
      - `<=`
      - `in`
      - `not in`
  
      The `operator` values in Logic dictionaries must be one of:
  
      - `NOT`
      - `OR`
      - `AND`
  
  
      A simple filter:
      ```python
      filters = {"field": "meta.type", "operator": "==", "value": "article"}
      ```
  
      A more complex filter:
      ```python
      filters = {
          "operator": "AND",
          "conditions": [
              {"field": "meta.type", "operator": "==", "value": "article"},
              {"field": "meta.date", "operator": ">=", "value": 1420066800},
              {"field": "meta.date", "operator": "<", "value": 1609455600},
              {"field": "meta.rating", "operator": ">=", "value": 3},
              {
                  "operator": "OR",
                  "conditions": [
                      {"field": "meta.genre", "operator": "in", "value": ["economy", "politics"]},
                      {"field": "meta.publisher", "operator": "==", "value": "nytimes"},
                  ],
              },
          ],
      }
  
      :param filters: the filters to apply to the document list.
      :return: a list of Documents that match the given filters.
      """
      ...
  
file_path: haystack/haystack/document_stores/types/protocol.py
imports: from typing import Protocol, Optional, Dict, Any, List
  import logging
  from haystack.dataclasses import Document
  from haystack.document_stores.types.policy import DuplicatePolicy
label_desc: Use image node_id 4 for calling the DocumentStore obj's underlying member method code with example usage: obj.filter_documents(filters) without return types