diff --git a/examples/async/search_as_you_type.py b/examples/async/search_as_you_type.py index 67830b20..2a069bea 100644 --- a/examples/async/search_as_you_type.py +++ b/examples/async/search_as_you_type.py @@ -32,21 +32,11 @@ from elasticsearch_dsl import ( AsyncDocument, SearchAsYouType, - analyzer, async_connections, mapped_field, - token_filter, ) from elasticsearch_dsl.query import MultiMatch -# custom analyzer for names -ascii_fold = analyzer( - "ascii_fold", - # we don't want to split O'Brian or Toulouse-Lautrec - tokenizer="whitespace", - filter=["lowercase", token_filter("ascii_fold", "asciifolding")], -) - class Person(AsyncDocument): if TYPE_CHECKING: diff --git a/examples/search_as_you_type.py b/examples/search_as_you_type.py index e22b11da..f319b6eb 100644 --- a/examples/search_as_you_type.py +++ b/examples/search_as_you_type.py @@ -28,24 +28,9 @@ import os from typing import TYPE_CHECKING, Optional -from elasticsearch_dsl import ( - Document, - SearchAsYouType, - analyzer, - connections, - mapped_field, - token_filter, -) +from elasticsearch_dsl import Document, SearchAsYouType, connections, mapped_field from elasticsearch_dsl.query import MultiMatch -# custom analyzer for names -ascii_fold = analyzer( - "ascii_fold", - # we don't want to split O'Brian or Toulouse-Lautrec - tokenizer="whitespace", - filter=["lowercase", token_filter("ascii_fold", "asciifolding")], -) - class Person(Document): if TYPE_CHECKING: