On Sunday 08 February 2004 20:07, Chris Kimm wrote:

>  Two possible
> approaches, both of which seem ungainly, are 1) creating a temporary
> index for each document being indexed 

You can use a RAMDirectory for indexing so nothing needs to be written to 
disk. This should be quite fast.

> or 2) Writing a class that matches 
> document Fields with Query Terms.  This second approach would require a
> way to extract individual Terms from Queries.  Is that possible?

Yes, you need to recursively iterate over all parts of the query. For 
example, a boolean query may consist of other boolean queries. You need to 
go down until you've got a TermQuery, which holds the term itself (or you 
could use rewrite() to make this easier).

Regards
 Daniel

-- 
http://www.danielnaber.de

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

Reply via email to