How to support wildcard search on both analyzed & not analyzed field


(Neeraj Mohta) #1

I have one query related to wildcard search queries.
scenario : Earlier we had one field as not analyzed field and wildcard queries are working fine on this field.
Now we have change this field to analyzed and now wildcard query is not returning any result.

Please suggest correct way to support wildcard search for both on analyzed & not analyzed field (as we have both analyzed & not analyzed fields).

Thanks in advance,
Neeraj.


(David Pilato) #2

You should avoid wildcards, really!

But if you really want to do this inefficient thing, you can index the same field twice using multifield feature.
One will be analyzed, the other won't be. This is what Logstash is doing for other reasons with the .raw generated field.


(system) #3