First pass at improving analyzer docs (elastic#18269)
* Docs: First pass at improving analyzer docs
I've rewritten the intro to analyzers plus the docs
for all analyzers to provide working examples.
I've also removed:
* analyzer aliases (see elastic#18244)
* analyzer versions (see elastic#18267)
* snowball analyzer (see elastic#8690)
Next steps will be tokenizers, token filters, char filters
* Fixed two typos
The built-in analyzers can be used directly without any configuration. Some
of them, however, support configuration options to alter their behaviour. For
instance, the <<analysis-standard-analyzer,`standard` analyzer>> can be configured
to support a list of stop words:
[source,js]
--------------------------------
PUT my_index
{
"settings": {
"analysis": {
"analyzer": {
"std_english": { <1>
"type": "standard",
"stopwords": "_english_"
}
}
}
},
"mappings": {
"my_type": {
"properties": {
"my_text": {
"type": "text",
"analyzer": "standard", <2>
"fields": {
"english": {
"type": "text",
"analyzer": "std_english" <3>
}
}
}
}
}
}
}
GET _cluster/health?wait_for_status=yellow
POST my_index/_analyze
{
"field": "my_text", <2>
"text": "The old brown cow"
}
POST my_index/_analyze
{
"field": "my_text.english", <3>
"text": "The old brown cow"
}
--------------------------------
// CONSOLE
<1> We define the `std_english` analyzer to be based on the `standard`
analyzer, but configured to remove the pre-defined list of English stopwords.
<2> The `my_text` field uses the `standard` analyzer directly, without
any configuration. No stop words will be removed from this field.
The resulting terms are: `[ the, old, brown, cow ]`
<3> The `my_text.english` field uses the `std_english` analyzer, so
English stop words will be removed. The resulting terms are:
`[ old, brown, cow ]`
Oops, something went wrong.
ProTip!
Use n and p to navigate between commits in a pull request.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
Learn more.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
You can always update your selection by clicking Cookie Preferences at the bottom of the page.
For more information, see our Privacy Statement.
Essential cookies
We use essential cookies to perform essential website functions, e.g. they're used to log you in.
Learn more
Always active
Analytics cookies
We use analytics cookies to understand how you use our websites so we can make them better, e.g. they're used to gather information about the pages you visit and how many clicks you need to accomplish a task.
Learn more
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync loggly fork with current master #2
Sync loggly fork with current master #2
Changes from 1 commit
99aad3d22dc06f1a321febe239b834b583910f9df3946c7e4cb29e04a0ba3c96302fb672fb93e0cf1d166c3beaac25f8ad04bd55d2636703713c0df6c7a44cbaceabd2232a7c8c7739937382ecf349c4f07c2fbf7aca138a31b94ee322903b2ce2f5262a814c82e5640b41580cf1d0d59162fd27c8397d4cf53859fee8c728409e4372eceb8e178c48bdda49226679c15f33e616c4c250c6d6a5693c1f6fff82db0eed5cf0a6f40c98dba261385e25d01526b85d2fc03ca02d6564825321e94e68397328ca21aa0929187cd63362c8bdd31980dbe3151a53c5a8bf759ad8bf536b9ac469a90bdc6f15f35ffcb1323bc926b283a6d2247b5c82dea4499fe5ce9052191f78d615f52eb6f3c4554fe8d3427b223d67dfad07055a0cfdd34d90b04c6cf7e7656d7e124e8e567c0734230697ce49d21b07d8b3e784c9e58fc513821d716f928e2b959c135b66e8529e11b96c2cae5754b1c1163912761c4090a18ff699ee3ce6c9f3b2ab82d2b2320f778c9f1fb6a3443976d1199cd8e16af607d87087c55df19de8354db91df364ddf9167d14728e88ac1193567a2d3c5f867b69e4eb12a423b6698c3e839dade90d00fcb40b98d52537d473be01f270ed2ddebbb9901c25b0ff56521d5b9f10eaa8315be79ed3d1be072c3d3d99988105d0d2d2bc1afcb5c740feb10e3b37a78cdcd4ae5c0db352a90000dd623a468120f36c7425289343f59408ef2e3a88c52e883f3fa59b7d02fb7d1fd1752cdac46094704aef78ce214ce31ded91d5ddc531e0970c595b6f9abe54c24dfdae97aeed5b0b5a7edf9ba2fe155d8f68468e7ac4f481492b6556e27bf8e6717225d93aeb66802cf4298972f392e613f4b6a149193d1b38243c9e7667a091557fc8b319ca821c54033a45e1cc0660386546aed87a47d33ad5ce59eb1b2cf81c0b7b1c2d3b106a4f647753420a0ffe6ee8ddf5def6a7631dfbe8b531dcbfddc2c1f1d80542a63285a2bf585e5f0cc795644f49abb015b389ef46632bb4c2e4f87dd8b373c30b5b4f9d12f7b7689a1afe05ee86d288deae01a4f97a41eed0edd13e4edee5866a545d790c7680bb46b2764b47ce4af4b5189eb420af482fced8da189341d6b4e47bc5532d38adfd603b66d4025dd642d3142e3930a2158871fdd113e2399fbbd7328164cc9d5537d9ce96f55ee5cc294317b10830bd42e258379b2b474ec4825ddf4323010381de8155e1ef9667dbFile filter...
Jump to…
First pass at improving analyzer docs (elastic#18269)