You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Volodymyr Bychkoviak (JIRA)" <ji...@apache.org> on 2005/12/05 18:26:08 UTC

[jira] Commented: (LUCENE-476) BooleanQuery add public method that returns number of clauses this query

    [ http://issues.apache.org/jira/browse/LUCENE-476?page=comments#action_12359321 ] 

Volodymyr Bychkoviak commented on LUCENE-476:
---------------------------------------------

sorry for unfinished description

add public method getClausesCount() to BooleanQuery that returns number of clauses this query.

current ways of getting clauses count are:
 1).
 int clausesCount = booleanQuery.getClauses().length;

which is inefiсient because on this method call two array are created
2). keeping external counter of Clauses which is not very convenient

proposed patch fixes this problem




> BooleanQuery add public method that returns number of clauses this query
> ------------------------------------------------------------------------
>
>          Key: LUCENE-476
>          URL: http://issues.apache.org/jira/browse/LUCENE-476
>      Project: Lucene - Java
>         Type: Improvement
>   Components: Search
>     Reporter: Volodymyr Bychkoviak
>  Attachments: BooleanQuery.diff
>
> BooleanQuery add public method getClausesCount() that returns number of clauses this query.
> current ways of getting clauses count are:
> 1).
>  int clausesCount  = booleanQuery.getClauses().length;
> or 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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