Describe the feature:
In this page: https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-custom-analyzer.html , all fields/parameters used for making custom analyzer are explained except for "type", I am quite confused with what to put into this "type" field.
From the demo, I can see "custom" is used, but don't know if I can put any other words I like into this field.
My apologize if it is explained in other places.
Elasticsearch version (bin/elasticsearch --version):
Plugins installed: []
JVM version (java -version):
OS version (uname -a if on a Unix-like system):
Description of the problem including expected versus actual behavior:
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
1.
2.
3.
Provide logs (if relevant):
The type here refers to the type of the built-in analyzer. If you look at the other analyzers you'll see that the type field has the value of standard for the Standard Analyzer, pattern for the Pattern Analyzer etc. I agree that the documentation could be improved on this.
Pinging @elastic/es-search-aggs
Hi tlrx,
A lot thanks for your explanation, it's very useful to my work.
Hope that doc could be improved recently :)
I think this issue should be kept open till doc improved, please feel free to close it if necessary.
Hello,
If you don't mind I would like to work on this and will submit a pull request in the upcoming days.
@tlrx Please tell me if I got this right: type in case of an analyzer can be any of those listed here:
https://github.com/elastic/elasticsearch/blob/b04faa059b50bfd8c55a5704c5bca432439ec85d/server/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java#L242
plus any of the additional analyzers coming from the installed plugins.
So, when customizing analyzers there are two options:
type is in the list of built-in analyzers (standard, keyword, etc) then the new analyzer will be the built-in + your settings changedtype is custom - you can define your own chain of character filters/tokenizer/token filter (basically DIY analyzer from the building pieces available).If this is correct, I will work on how to integrate this information into the documentation page and will submit a pull request.
Thank you.
Most helpful comment
Hello,
If you don't mind I would like to work on this and will submit a pull request in the upcoming days.
@tlrx Please tell me if I got this right:
typein case of an analyzer can be any of those listed here:https://github.com/elastic/elasticsearch/blob/b04faa059b50bfd8c55a5704c5bca432439ec85d/server/src/main/java/org/elasticsearch/indices/analysis/AnalysisModule.java#L242
plus any of the additional analyzers coming from the installed plugins.
So, when customizing analyzers there are two options:
typeis in the list of built-in analyzers (standard,keyword, etc) then the new analyzer will be the built-in + your settings changedtypeis custom - you can define your own chain of character filters/tokenizer/token filter (basically DIY analyzer from the building pieces available).If this is correct, I will work on how to integrate this information into the documentation page and will submit a pull request.
Thank you.