[
https://issues.apache.org/jira/browse/IGNITE-7055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279577#comment-16279577
]
Roman Shtykh edited comment on IGNITE-7055 at 12/6/17 11:33 PM:
----------------------------------------------------------------
In _GridLuceneIndex_ _IndexWriter_ is build with a _StandardAnalyzer_, which
applies _LowerCaseFilter_ to query terms. It makes queries case-insensitive.
However, field names are case-sensitive, and in Ignite indexes are upper-cased.
Therefore _resume:Master_ won't be found, but _RESUME:Master_ will be found.
I propose to convert all queries to upper case. That will make Ignite indexes
searcheable when a field is specified in a Lucene query, and won't effect the
current search behavior.
was (Author: roman_s):
In _GridLuceneIndex_ _IndexWriter_ is build with a _StandardAnalyzer_, which
applies _LowerCaseFilter_ to query terms. It makes queries case-insensitive.
However, fields are case-sensitive, and in Ignite indexes are upper-cased.
Therefore _resume:Master_ won't be found, but _RESUME:Master_ will be found.
I propose to convert all queries to upper case. That will make Ignite indexes
searcheable when a field is specified in a Lucene query, and won't effect the
current search behavior.
> Text query for a particular field not working
> ---------------------------------------------
>
> Key: IGNITE-7055
> URL: https://issues.apache.org/jira/browse/IGNITE-7055
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: 2.3
> Reporter: Valentin Kulichenko
> Assignee: Roman Shtykh
>
> Lucene queries allow to specify a specific field name to search in [1],
> however this doesn't seem to work in latest versions of Ignite.
> To reproduce, modify {{CacheQueryExample#textQuery}} to use Lucene field
> expression:
> {code}
> QueryCursor<Cache.Entry<Long, Person>> masters =
> cache.query(new TextQuery<Long, Person>(Person.class, "resume:Master"));
> {code}
> This query returns empty result.
> [1]
> http://lucene.apache.org/core/5_5_2/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Fields
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)