class_docstr: A search 'query', associated with a search field (like a SearchToolbar).
  
  Every searchable `BufferControl` points to a `search_buffer_control`
  (another `BufferControls`) which represents the search field. The
  `SearchState` attached to that search field is used for storing the current
  search query.
  
  It is possible to have one searchfield for multiple `BufferControls`. In
  that case, they'll share the same `SearchState`.
  If there are multiple `BufferControls` that display the same `Buffer`, then
  they can have a different `SearchState` each (if they have a different
  search control).
class_docstr_tok: ["A","search","'query","'",",","associated","with","a","search","field","(","like","a","SearchToolbar",")",".","Every","searchable","`","BufferControl","`","points","to","a","`","search_buffer_control","`","(","another","`","BufferControls","`",")","which","represents","the","search","field",".","The","`","SearchState","`","attached","to","that","search","field","is","used","for","storing","the","current","search","query",".","It","is","possible","to","have","one","searchfield","for","multiple","`","BufferControls","`",".","In","that","case",",","they","'ll","share","the","same","`","SearchState","`",".","If","there","are","multiple","`","BufferControls","`","that","display","the","same","`","Buffer","`",",","then","they","can","have","a","different","`","SearchState","`","each","(","if","they","have","a","different","search","control",")","."]
code: def __init__(
      self,
      text: str = "",
      direction: SearchDirection = SearchDirection.FORWARD,
      ignore_case: FilterOrBool = False,
  ) -> None:
      self.text = text
      self.direction = direction
      self.ignore_case = to_filter(ignore_case)
  
file_path: catboost/contrib/python/prompt-toolkit/py3/prompt_toolkit/search.py
imports: from __future__ import annotations
  from enum import Enum
  from typing import TYPE_CHECKING
  from .application.current import get_app
  from .filters import FilterOrBool, is_searching, to_filter
  from .key_binding.vi_state import InputMode
label_desc: Use image node_id 1 to create a new SearchState object  with example: obj = SearchState(text, direction, ignore_case)