Use a not analyzed field. You field is analyzed here with the standard analyzer. Term filter compares the string you pass with the invented index.
Have a look at _analyze API as well. Should help to understand what happens. David > Le 6 mars 2015 à 13:33, João Lima <[email protected]> a écrit : > > "id_instancia": { > "type": "string", > "include_in_all": false > } > >> On Friday, March 6, 2015 at 9:29:21 AM UTC-3, David Pilato wrote: >> What is your mapping for this field? >> >> -- >> David Pilato - Developer | Evangelist >> Elasticsearch.com >> @dadoonet | @elasticsearchfr | @scrutmydocs >> >> >> >> >>> Le 6 mars 2015 à 13:27, João Lima <[email protected]> a écrit : >>> >>> I'm trying to make a query like this: >>> >>> { >>> "query" :{ >>> "filtered" :{ >>> "query" :{ >>> "multi_match" : { >>> "query" : "Vonder Carregador de Baterias CBV 0900 - 110V", >>> "fields" : [ "nome^10", "descricao" ], >>> "operator" : "or" >>> } >>> }, >>> "filter" : { >>> "bool" : { >>> "must" : [ >>> {"term" : { "ativo" : 1 }}, >>> {"term" : {"id_instancia": "Master_cleaner"}}, >>> ] >>> } >>> } >>> } >>> } >>> } >>> But when I filter some term with "_" it doesn't work. >>> >>> >>> -- >>> 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/481d9ee8-f5f0-43b2-a54d-06d9a6f25ae7%40googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. > > -- > 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/554effd6-d633-46ac-8af9-95088cda70de%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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/A0B6AFB5-796E-4759-BA05-F752F636F3B0%40pilato.fr. For more options, visit https://groups.google.com/d/optout.
