I would probably go with a Pattern Tokenizer and define whatever regex you need.
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pattern-tokenizer.html
 
<https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-pattern-tokenizer.html>

The standard one is more for english text which means that a dot need to have a 
space after it in order to be considered as a break between two tokens.

Make sense?

-- 
David Pilato - Developer | Evangelist 
elastic.co
@dadoonet <https://twitter.com/dadoonet> | @elasticsearchfr 
<https://twitter.com/elasticsearchfr> | @scrutmydocs 
<https://twitter.com/scrutmydocs>





> Le 29 mai 2015 à 09:39, Marian Steinbach <marian.steinb...@gmail.com> a écrit 
> :
> 
> We have ElasticSearch 1.5 set up with a very simple mapping to perform full 
> text search in our docs (https://docs.giantswarm.io/). 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!
> 
> 
> 
> -- 
> Please update your bookmarks! We have moved to https://discuss.elastic.co/ 
> <https://discuss.elastic.co/>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to elasticsearch+unsubscr...@googlegroups.com 
> <mailto:elasticsearch+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/85a03096-ae33-4517-8eab-6f2be4da73ed%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/elasticsearch/85a03096-ae33-4517-8eab-6f2be4da73ed%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
Please update your bookmarks! We have moved to https://discuss.elastic.co/
--- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/8B2107E8-4E9A-47FA-BFE0-FE36FF9FBF1C%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to