The query parser breaks down on whitespaces as well. So, the things that gets passed to the analyzer and then construct the query is "coney" and then "island" without doing the actual escaping. Not ideal, but thats how it works...
On Sunday, January 16, 2011 at 12:54 AM, Andrei wrote:
Clint,
"query_string": "tags:coney\ island" seemed to work. Though now I'm
not sure whether I should just escape the space this way or other non-
alphanumeric characters as well. Maybe Shay can shed some light on
this.-Andrei
On Jan 15, 8:30 am, Clinton Gormley clin...@iannounce.co.uk wrote:
Actually, the ES docs for mapping mention:
- index_analyzer: used when indexing a field
- search_analyzer: used when analyzing a field that is part of
a query string- analyzer: sets both index_analyzer and search_analyzer
Seehttp://www.elasticsearch.com/docs/elasticsearch/mapping/core_types/
So, my reading of this is that it should work - Andrei is, after all,
searching on "fields": ["tags"]This may be a bug.
Andrei, what happens if you search for:
- "query_string": "tags:coney\ island"
- "query_string": "tags:coney\ island"
- "query_string": "tags:(coney island)"
I'm suggesting a few possibilities, because I'm not sure how to
represent an embedded space in the query string.clint