|
Il 21/01/2015 11:43, Alessandro
Bonfanti ha scritto:
OK, after a lot of attempts I can finally set analyezer to 'keyword' for default. I do this with: @es_client.indices.create index: "test", body: { "index" => { "analysis" => { "analyzer" => { "default" => { "type" => "keyword" }}}}}
Now I have solved some problems, I finally can do exact matching
stuff with 'term' query, for example on a path '/home/data/foo.bar'
or on a gene-id 'ENSG00000186092'.The bad things are that problems with 'query_string' even worsen. It seems that query_string can't work with not analyzed fields. If I try a trivial:
@es_client.search index: "test", body: {"query" => { "query_string" => { "query" => "ENSG00000186092" }}}
Nothing works (0 results found). Text hasn't spaces or other special
characters that could create problems with tokenization. So what's
the problem?Can a solution be the use of a 'fake' pattern tokenizer with pattern "$^" (this should create a non-matchable pattern, with result alike the 'keyword' analyzer)? Any other idea will be very appreciated. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/54C65F28.3080900%40gmail.com. For more options, visit https://groups.google.com/d/optout. |
- Re: I can't find anything after hypens or underscores Alessandro Bonfanti
- Re: I can't find anything after hypens or undersc... Alessandro Bonfanti
- Re: I can't find anything after hypens or und... Alessandro Bonfanti
- Re: I can't find anything after hypens or... Alessandro Bonfanti
- Re: I can't find anything after hypen... Alessandro Bonfanti
