lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5530) ComplexPhraseQueryParser throws ParseException for fielded queries
Date Sun, 16 Mar 2014 19:48:43 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-5530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937312#comment-13937312
] 

ASF subversion and git services commented on LUCENE-5530:
---------------------------------------------------------

Commit 1578148 from [~erickoerickson] in branch 'dev/trunk'
[ https://svn.apache.org/r1578148 ]

LUCENE-5530 Allow the ComplexPhraseQueryParser to search order or un-order proximity queries.

>  ComplexPhraseQueryParser throws ParseException for fielded queries
> -------------------------------------------------------------------
>
>                 Key: LUCENE-5530
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5530
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/queryparser
>    Affects Versions: 4.7
>            Reporter: Ahmet Arslan
>            Assignee: Erick Erickson
>              Labels: complexPhrase
>             Fix For: 4.8
>
>         Attachments: LUCENE-5530.patch, LUCENE-5530.patch
>
>
> Queries using QueryParser's non-default field e.g.
> author:"j* smith" are not supported by ComplexPhraseQueryParser. For example following
code snippet 
> {code}
> ComplexPhraseQueryParser qp = new ComplexPhraseQueryParser(TEST_VERSION_CURRENT, "defaultField",
new MockAnalyzer(new Random()));
>       qp.parse("author:\"fred* smith\"") ;
> {code}
> yields 
> {noformat}
> 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(ComplexPhraseQueryParser.java:147)
> 	at org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser.newTermQuery(ComplexPhraseQueryParser.java:135)
> 	... 49 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message