Skip to content

Instantly share code, notes, and snippets.

@harshvb7
Last active July 10, 2019 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harshvb7/0f3ed03f3932da67d7f0e413fc831520 to your computer and use it in GitHub Desktop.
Save harshvb7/0f3ed03f3932da67d7f0e413fc831520 to your computer and use it in GitHub Desktop.
# an example from elasticsearch-dsl docs
from elasticsearch_dsl import analyzer
html_strip = analyzer('html_strip',
tokenizer="standard",
filter=["standard", "lowercase", "stop", "snowball"],
char_filter=["html_strip"]
)
class Post(Document):
title = Text()
category = Text(
analyzer=html_strip
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment