You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Balekundri, Manjunath V" <ma...@cgi.com> on 2017/09/01 04:00:47 UTC
RE: LUCENE-7932:Search record with field value='a' or 'A' returns
all records along with one more field value
Hi Team,
Any updates regarding below issue.
I was supposed to fix this issue by today.
Kindly let me know alternative solutions if any.
My task (AS-659) carry forwarded to next sprint because we still not got solution.
Kindly help.
I even logged ticket: https://issues.apache.org/jira/browse/LUCENE-7932
Best regards,
Rohit
From: Balekundri, Manjunath V
Sent: Tuesday, August 22, 2017 12:56 PM
To: 'dev@lucene.apache.org'; 'sarowe@gmail.com'
Cc: Palanisamy, Gopinath S (gopinath.palanisamy@cgi.com); Carlsson, Magnus; Holebasavanahalli Putta Shetty, Jagadeesha; Jena, Satya Ranjan
Subject: LUCENE-7932:Search record with field value='a' or 'A' returns all records along with one more field value
Importance: High
Hi!
As per jira-LUCENE-7932 discussions I am sending this mail along with my java code(LuceneQueryTest.java class: attached) calling Lucene code.
A. Code structure:
Attached sample code(LuceneQueryTest.java class) consists of 4 steps:
1. Create index (Needed to be executed only once to insert records)
2. Prepare query parameters
3. Prepare QueryParser object
4. Search and display results
B. Analysis Report:
Step 1 can be executed only once because it creates index files first time and then it can be commented.
Step 2 has 3 cases
Case a) queryParams = "LocationCode:1 AND Category:a";
Test analysis: When we execute this query all records are fetched, even though we don't have records of Category=a. (Not working)
[cid:image001.png@01D32304.5139F330]
Case b) queryParams = "LocationCode:1 AND Category:A";
Test analysis: When we execute this query all records are fetched, even though we don't have records of Category=A. (Not working)
[cid:image002.png@01D32304.5139F330]
Case c) queryParams = "LocationCode:1 AND Category:a*"; (Works Fine)
Test analysis: When we execute this query No records are fetched, this works fine.
[cid:image003.png@01D32304.5139F330]
C. Submission to lucene development team:
Looking at case a) and case b) I think there is bug in Lucene IndexSearcher.java or IndexReader.java in LuceneCore module.
I used both Lucene 5.3 and latest version Lucene 6.6 to reproduce issue. I found same results.
If you need more information, please let me know.
Best regards,
Rohit