Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does my analyzer disappear when I restart Elastic Search?
    primarykey
    data
    text
    <p>Full gist at <a href="https://gist.github.com/3442562" rel="nofollow">https://gist.github.com/3442562</a></p> <p>I have an analyzer:</p> <pre><code>"analyzer" : { "lowercase_keyword" : { "type" : "custom", "tokenizer" : "keyword", "filter" : ["lowercase", "trim"] } } </code></pre> <p>that is referenced in a mapping:</p> <pre><code>"location_countries" : { "properties" : { "country" : { "type" : "string", "analyzer" : "lowercase_keyword" } } } </code></pre> <p>And when I use the 'country' field in a filter or a facet, the field is (correctly) treated as a keyword.</p> <pre><code>curl -XGET 'localhost:9200/clinical_trials/_search?pretty=true' -d ' { "query" : { "term" : { "brief_title" : "dermatitis" } }, "filter" : { "term" : { "country" : "united states" } }, "facets" : { "tag" : { "terms" : { "field" : "country" } } } } ' </code></pre> <p>facet results:</p> <pre><code>"facets" : { "tag" : { "_type" : "terms", "missing" : 0, "total" : 1, "other" : 0, "terms" : [ { "term" : "united states", "count" : 1 } ] } </code></pre> <p>Everything works fine until the machine gets rebooted or the Elastic Search service gets restarted. After a restart, all my filters stop working as if the analyzer does not exist.</p> <p>The same query against the same data results in:</p> <pre><code>"facets" : { "tag" : { "_type" : "terms", "missing" : 0, "total" : 2, "other" : 0, "terms" : [ { "term" : "united", "count" : 1 }, { "term" : "states", "count" : 1 } ] } </code></pre> <p>If I query the _settings/_mappings of my index, the analyzer and mappings are still defined correctly but the analyzer seems to have no effect. </p> <p>What am I doing wrong? </p> <p>Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload