lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volodymyr Bychkoviak (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-476) BooleanQuery add public method that returns number of clauses this query
Date Mon, 05 Dec 2005 17:26:08 GMT
    [ 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


Mime
View raw message