Hi,
is there any way how to search part of phrase as case-sensitive and part as
case-insensitive?
The only solution I found for case sensitive/insensitive querying is to
have multiple analyzers applied to one field (one analyzer with lowercase
token filter and one without)
With this solution I can search in following way
Field.lowercase: "My Phrase"
or
Field.sensitive: "My Phrase"
But what to do if I whould like to search "My" as case sensitive and
"Phrase" as case insensitive?
I found span_near query but error message sais that "Clauses must have
same field"
Hi,
is there any way how to search part of phrase as case-sensitive and part
as case-insensitive?
The only solution I found for case sensitive/insensitive querying is to
have multiple analyzers applied to one field (one analyzer with lowercase
token filter and one without)
With this solution I can search in following way
Field.lowercase: "My Phrase"
or
Field.sensitive: "My Phrase"
But what to do if I whould like to search "My" as case sensitive and
"Phrase" as case insensitive?
I found span_near query but error message sais that "Clauses must have
same field"
Maybe the question to ask will be how do you determine which part of phrase
will be searched as case sensitive and which will be not.
If that logic is consistent it can be applied at indexing itself, and same
analyzer used for search.
regards and thanks
amish
On Monday, November 10, 2014 9:22:19 AM UTC-8, Zdeněk Šebl wrote:
Hi,
is there any way how to search part of phrase as case-sensitive and part
as case-insensitive?
The only solution I found for case sensitive/insensitive querying is to
have multiple analyzers applied to one field (one analyzer with lowercase
token filter and one without)
With this solution I can search in following way
Field.lowercase: "My Phrase"
or
Field.sensitive: "My Phrase"
But what to do if I whould like to search "My" as case sensitive and
"Phrase" as case insensitive?
I found span_near query but error message sais that "Clauses must have
same field"
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.