I wonder if this repeats in version 7.7.2, too?

Best regards


On 10/21/19 5:22 PM, Shifflett, David [USA] wrote:
Baris,

Sorry I neglected to add that piece.
This test was run against 8.0.0,
but I also want it to work in later versions.

Another piece of my project is using 8.2.0.

Thanks again for any info,
David Shifflett


On 10/21/19, 3:23 PM, "baris.ka...@oracle.com" <baris.ka...@oracle.com> wrote:

     David,-
which version of Lucene are You using? Best regards On 10/21/19 1:31 PM, Shifflett, David [USA] wrote:
     > Hi all,
     > Using the code snippet:
     >      ComplexPhraseQueryParser qp = new 
ComplexPhraseQueryParser(“somefield”, new StandardAnalyzer());
     >      String teststr = "\"Foo Bar\"~2";
     >      Query queryToSearch = qp.parse(teststr);
     >      System.out.println("Query : " + queryToSearch.toString());
     >      System.out.println("Type of query : " + 
queryToSearch.getClass().getSimpleName());
     >
     > I am getting the output
     >      Query : "Foo Bar"~2
     >      Type of query : ComplexPhraseQuery
     >
     > If I change teststr to "\"Foo Bar\""
     > I get
     >      Query : "Foo Bar"
     >      Type of query : ComplexPhraseQuery
     >
     > If I change teststr to "Foo Bar"
     > I get
     >      Query : content:foo content:bar
     >      Type of query : BooleanQuery
     >
     >
     > In the first two cases I was expecting the search terms to be switched 
to lowercase.
     >
     > Were the Foo and Bar left as originally specified because the terms are 
inside double quotes?
     >
     > How can I specify a search term that I want treated as a Phrase,
     > but also have the query parser apply the LowerCaseFilter?
     >
     > I am hoping to avoid the need to handle this using PhraseQuery,
     > and continue to use the QueryParser.
     >
     >
     > Thanks in advance for any help you can give me,
     > David Shifflett
     >
---------------------------------------------------------------------
     To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
     For additional commands, e-mail: java-user-h...@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to