hi, i appreciate see you guys planning for a new feature of Lucene, but this topic 
started a with a question, it is possible get a list of terms from MultiTermQuery?? as 
it was possible in the release 1.2.

Thank you,


--

On Mon, 24 Feb 2003 08:51:22  
 Doug Cutting wrote:
>Tatu Saloranta wrote:
>> It would be nice if all queries would have a method that allows terms to be 
>> collected, ie. so that Query base class would have an abstract method.
>> Visitor pattern might make most sense; so we could have a TermCollector 
>> object, and queries could have method like:
>> 
>> void collectTerms(TermCollector c)
>> 
>> which would do something like
>> 
>> c.collectTerm(t, this);
>> 
>> for each term it contains, and/or
>> 
>> q.collectTerms(c)
>> 
>> for each sub-query it contains, to get terms recursively.
>> 
>> Then, TermCollector would need to define 'collectTerm(Term t, Query q);' to
>> collect all terms, and have method(s) for getting all terms plus resetting it 
>> (if it's to be reused). Some TermCollectors could also keep track of queries 
>> terms came from, to allow keeping track of phrase query term dependencies 
>> etc. etc.
>> Using visitor would be more elegant than having to check class types and casts 
>> when traversing. Plus, when adding new queries, would only need to add that 
>> one method, and visitors would still work ok.
>> 
>> ... having described this, I probably should just go and implement it I guess. 
>
>+1
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>


_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to