How to perform exact match on wildcard field

Hi,

We used the following query to get exact match on wildcard field:

"query_string": {
"query": ""abcddd"",
"fields": [
"*.Name"
]
}
}

but it returned results also for values, such as: abc, abcd, etc...

Does anyone has an idea how to get an exact match in such case? We tried to
add "analyzer:simple", but it made things worse and sometimes didn't return
results at all.

Many thanks.

Maya

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi,
I think the behaviour you see depends on your current mapping. Are you
maybe indexing some of the fields using ngrams?
Also, I don't quite get what you're trying to do with the quotation marks.
Usually they are used with phrase queries, when you have multiple terms in
order to say that those terms need to be close to each others.

Could you please post your mapping and clarify what you're trying to
achieve?

On Tuesday, July 9, 2013 8:32:42 PM UTC+2, mayap wrote:

Hi,

We used the following query to get exact match on wildcard field:

"query_string": {
"query": ""abcddd"",
"fields": [
"*.Name"
]
}
}

but it returned results also for values, such as: abc, abcd, etc...

Does anyone has an idea how to get an exact match in such case? We tried
to add "analyzer:simple", but it made things worse and sometimes didn't
return results at all.

Many thanks.

Maya

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.