Skip to content

[DOCS] Reformat flatten_graph token filter#54268

Merged
jrodewig merged 3 commits intoelastic:masterfrom
jrodewig:docs__reformat-flatten-graph-tokenfilter
Apr 16, 2020
Merged

[DOCS] Reformat flatten_graph token filter#54268
jrodewig merged 3 commits intoelastic:masterfrom
jrodewig:docs__reformat-flatten-graph-tokenfilter

Conversation

@jrodewig
Copy link
Copy Markdown
Contributor

Makes the following changes to the flatten_graph token filter docs:

  • Rewrites description and adds Lucene link
  • Adds detailed analyze example
  • Adds analyzer example

Makes the following changes to the `flatten_graph` token filter docs:

* Rewrites description and adds Lucene link
* Adds detailed analyze example
* Adds analyzer example
@jrodewig jrodewig added >docs General docs changes :Search Relevance/Analysis How text is split into tokens labels Mar 26, 2020
@jrodewig jrodewig requested a review from romseygeek March 26, 2020 13:19
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-docs (>docs)

@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search (:Search/Analysis)

Copy link
Copy Markdown
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jrodewig . I think we need to more actively discourage people from using this filter, as it's a not-very-good solution for a problem that should be fixed by doing things at query time instead.

If possible, avoid using graph token filters in
<<analysis-index-search-time,index analyzers>>. Use the respective
<<analysis-synonym-tokenfilter,`synonym`>> or
<<analysis-word-delimiter-tokenfilter,`word_delimiter`>> filters instead.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to reword this to strongly advise against using these at index time at all - generally speaking, filters that could produce graphs should be used at query time instead. flatten_graph is a kind of shonky workaround for a problem that really should be fixed elsewhere.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @romseygeek!

With afcbebf, I reworded the warning to remove the recommendation for the synonym and word_delimiter filters. It also recommends that token graph filters only be used in search analyzers.

Let me know if you see any other needed changes!

@jrodewig jrodewig requested a review from romseygeek April 1, 2020 17:48
Copy link
Copy Markdown
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @jrodewig

@jrodewig
Copy link
Copy Markdown
Contributor Author

Thanks @romseygeek.

@jrodewig jrodewig merged commit 2416036 into elastic:master Apr 16, 2020
@jrodewig jrodewig deleted the docs__reformat-flatten-graph-tokenfilter branch April 16, 2020 12:34
jrodewig added a commit that referenced this pull request Apr 16, 2020
* [DOCS] Reformat `flatten_graph` token filter

Makes the following changes to the `flatten_graph` token filter docs:

* Rewrites description and adds Lucene link
* Adds detailed analyze example
* Adds analyzer example
jrodewig added a commit that referenced this pull request Apr 16, 2020
* [DOCS] Reformat `flatten_graph` token filter

Makes the following changes to the `flatten_graph` token filter docs:

* Rewrites description and adds Lucene link
* Adds detailed analyze example
* Adds analyzer example
jrodewig added a commit that referenced this pull request Apr 16, 2020
* [DOCS] Reformat `flatten_graph` token filter

Makes the following changes to the `flatten_graph` token filter docs:

* Rewrites description and adds Lucene link
* Adds detailed analyze example
* Adds analyzer example
@jrodewig
Copy link
Copy Markdown
Contributor Author

Backport commits

master 2416036
7.x f0b9be8
7.7 13fbbbc
7.6 4998b80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants