I wanted to know if the wildcardQueries are case sensitive - I have an
un-analyzed field which I am querying using a wildcardQuery, but for
some reason not getting any results when I change the case of the
search text. Please let me know if I could be doing this wrong or if
this is expected behavior.
I wanted to know if the wildcardQueries are case sensitive - I have an
un-analyzed field which I am querying using a wildcardQuery, but for
some reason not getting any results when I change the case of the
search text. Please let me know if I could be doing this wrong or if
this is expected behavior.
I wanted to know if the wildcardQueries are case sensitive - I have an
un-analyzed field which I am querying using a wildcardQuery, but for
some reason not getting any results when I change the case of the
search text. Please let me know if I could be doing this wrong or if
this is expected behavior.
-cheers,
Manish
Nope, everything is default. Not specifying any custom or out of the
box filter or indexer.
The wildcard query does not perform any analysis on the text you provide as
the query. If the field you index on is analyzed, this can be problematic
(like indexing "Snow", but not finding "Sn*").
I wanted to know if the wildcardQueries are case sensitive - I have an
un-analyzed field which I am querying using a wildcardQuery, but for
some reason not getting any results when I change the case of the
search text. Please let me know if I could be doing this wrong or if
this is expected behavior.
-cheers,
Manish
Nope, everything is default. Not specifying any custom or out of the
box filter or indexer.
Basically, if you index word "Snow" in a field that is not analyzed, it's
indexed as "Snow". But if you search for "Sn*", your query is getting
translated into Lucene prefix query for prefix "sn". In other words Lucene
lowercases your wildcard queries by default. As a result, you query for
"Sn*" doesn't return "Snow", but it may return "snow", for example. You can
turn this feature off by specifying "lowercase_expanded_terms": false in
your query:
On Wed, Nov 9, 2011 at 5:35 AM, Shay Banon kimchy@gmail.com wrote:
The wildcard query does not perform any analysis on the text you provide
as the query. If the field you index on is analyzed, this can be
problematic (like indexing "Snow", but not finding "Sn*").
I wanted to know if the wildcardQueries are case sensitive - I have an
un-analyzed field which I am querying using a wildcardQuery, but for
some reason not getting any results when I change the case of the
search text. Please let me know if I could be doing this wrong or if
this is expected behavior.
-cheers,
Manish
Nope, everything is default. Not specifying any custom or out of the
box filter or indexer.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.