lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volodymyr Bychkoviak <vbychkov...@i-hypergrid.com>
Subject Re: [jira] Commented: (LUCENE-476) BooleanQuery add public method that returns number of clauses this query
Date Mon, 05 Dec 2005 18:44:07 GMT
I think that BooleanQuery should not implement Collection directly, 
because it contains only BooleanClause's objects.


Collection view is good idea. I think it should be unmodifiable view.

  public Collection clauses() {
    return Collections.unmodifiableCollection(clauses);
  }



Yonik Seeley (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/LUCENE-476?page=comments#action_12359326 ]

>
> Yonik Seeley commented on LUCENE-476:
> -------------------------------------
>
> Perhaps it would be better to either support returning a Collection view of the BooleanQuery,
or have BooleanQuery directly implement Collection?
>
>   
>> 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 
>>     
>
>   

-- 
regards,
Volodymyr Bychkoviak


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message