We have ElasticSearch 1.5 set up with a very simple mapping to perform full text search in our docs. When searching for "swarmvars" we get no hits, although "swarmvars.json" appears in documents.
The field "text" is used as a catch-all field for all searchable content (title, document body, keywords). Here is the mapping:
"properties": {
...,
"text": {
"type": "string",
"store": true,
"index": "analyzed",
"term_vector": "with_positions_offsets",
"analyzer": "english",
}
}
When using the "english" analyzer on the text "Text containing swarmvars.json and more", the result are these tokens:
text
contain
swarmvars.json
more
Having the token "swarmvars.json" is fine. What I need are two additional tokens "swarmvars" and "json". How can I achieve that?
I was looking into creating a custom tokenizer, but I was unable to get it to work (errors when applying the settings) and also I was unable to find an example, no matter how I searched.
Thanks!