[ 
https://issues.apache.org/jira/browse/LUCENE-2518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Erick Erickson resolved LUCENE-2518.
------------------------------------

    Resolution: Won't Fix

2013 Old JIRA cleanup

> Make check of BooleanClause.Occur[] in MultiFieldQueryParser.parse less 
> stubborn
> --------------------------------------------------------------------------------
>
>                 Key: LUCENE-2518
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2518
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/queryparser
>    Affects Versions: 2.9, 2.9.1, 2.9.2, 2.9.3, 3.0, 3.0.1, 3.0.2
>            Reporter: Itamar Syn-Hershko
>            Priority: Minor
>
> Update the check in:
>   public static Query parse(Version matchVersion, String query, String[] 
> fields,
>       BooleanClause.Occur[] flags, Analyzer analyzer) throws ParseException {
>     if (fields.length != flags.length)
>       throw new IllegalArgumentException("fields.length != flags.length");
> To be:
>     if (fields.length > flags.length)
> So the consumer can use one Occur array and apply fields selectively. The 
> only danger here is with hitting a non-existent cell in flags, and this check 
> will provide this just as well without limiting usability for such cases.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to