thanks a lot, you were right, it was analyzed. However, I changed it (and killed my indices), checked my metadata and it's not analyzed, but if the content in the field in Api23 (vs api23) then the wildcard query doesn't work. What am I missing? I tried both upper and lower case search query, but it seems to be dependent on the content in the document, which is weird to me.
On Oct 8, 2011, at 11:47 AM, Shay Banon wrote:
trackingId is probably analyzed, so its gets broken down into several terms, using this:
create a sample index
curl -XPUT localhost:9200/test
see how the text for trackingId get analyzed using the default (standard) analyzer
curl -XGET localhost:9200/test/_analyze -d 'Api23-82199996'
You can see that the text Api23-82199996 gets broken down into two terms, Api23, and 82199996 that get indexed. If you want to treat it as a single term, you need to define in a mapping that trackingId is not analyzed.
On Fri, Oct 7, 2011 at 10:16 PM, Hakan Lindestaf email@example.com wrote:
I have some documents that have a field like this:
I would like to query on this, but only on the Api23 part. If possible
I want to ignore cases (to pick up both api23 and Api23). I tried to
query this using trackingid:api23* and trackingid:Api23* but no result
is returned. If I try trackingid:Api23-82199996 I get results, but
only for a full match of course. I realize there is something I'm
missing, but if anyone can help me understand or come up with a
workaround I'd appreciate it.
Here's a link to a ticket I opened for the UI, figured I'd start