jprante / elasticsearch-analysis-naturalsort

Natural sort plugin for Elasticsearch
https://jprante.github.io/elasticsearch-analysis-naturalsort/
Apache License 2.0
38 stars 19 forks source link

no example to configure digits #2

Closed scottbessler closed 7 years ago

scottbessler commented 11 years ago

I see from the source code that one could configure the # of digits supported by this plugin and that the default is 1.

It is unclear to me however how to configure this with elasticsearch's settings.

scottbessler commented 11 years ago
index :
    analysis :
        analyzer :
            naturalsort :
                tokenizer : keyword
                filter : [naturalsort2]
        filter :
            naturalsort2 :
                type : naturalsort
                digits : 2

appears to work, I'll try and get around to a pr to append to the docs.