lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ahmet Arslan (JIRA)" <>
Subject [jira] [Created] (LUCENE-5530) ComplexPhraseQueryParser throws ParseException for fielded queries
Date Sun, 16 Mar 2014 16:36:42 GMT
Ahmet Arslan created LUCENE-5530:

             Summary:  ComplexPhraseQueryParser throws ParseException for fielded queries
                 Key: LUCENE-5530
             Project: Lucene - Core
          Issue Type: Bug
          Components: modules/queryparser
    Affects Versions: 4.7
            Reporter: Ahmet Arslan
             Fix For: 4.8

Queries using QueryParser's non-default field e.g.
author:"j* smith" are not supported by ComplexPhraseQueryParser. For example following code

ComplexPhraseQueryParser qp = new ComplexPhraseQueryParser(TEST_VERSION_CURRENT, "defaultField",
new MockAnalyzer(new Random()));
      qp.parse("author:\"fred* smith\"") ;


Caused by: org.apache.lucene.queryparser.classic.ParseException: Cannot have clause for field
"defaultField" nested in phrase  for field "author"
	at org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser.checkPhraseClauseIsForSameField(
	at org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser.newTermQuery(
	... 49 more

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message