You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2015/04/16 18:26:59 UTC

[jira] [Commented] (LUCENE-6345) null check all term/fields in queries

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

Michael McCandless commented on LUCENE-6345:
--------------------------------------------

Thanks [~dakrone], patch looks great.  I found one small fix:

{noformat}
   public void add(BooleanClause clause) {
+    Objects.requireNonNull("BooleanClause must not be null");
     if (clauses.size() >= maxClauseCount) {
       throw new TooManyClauses();
     }
{noformat}

I'll fix & commit ...

> null check all term/fields in queries
> -------------------------------------
>
>                 Key: LUCENE-6345
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6345
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-6345.patch, LUCENE-6345.patch
>
>
> See the mail thread "is this lucene 4.1.0 bug in PerFieldPostingsFormat".
> If anyone seriously thinks adding a null check to ctor will cause measurable slowdown to things like regexp or wildcards, they should have their head examined.
> All queries should just check this crap in ctor and throw exceptions if parameters are invalid.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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