You are doing it correctly.  I tend to use MultiFieldQueryParser, but
lots of people have 1 'all' field like you.

Otis

--- Peter Pimley <[EMAIL PROTECTED]> wrote:

> 
> Hello everybody.
> 
> I'm a relative newbie with lucene, but I've got it set up on my
> system 
> and it's working well.
> 
> I'd like it to be the case that the default behaviour is to search 
> across all the Fields of all my Documents.  At the moment, when I
> create 
> my Document object, the last thing I do is to create an extra Field 
> called 'all', whose content is the concatinated contents of all the 
> other fields.  Then, when I use the QueryParser, I pass in 'all' as
> the 
> value of the default field parameter.
> 
> This works, but it makes my index a little under twice as large as it
> 
> would otherwise be.  That's not a great problem as I'm nowhere near 
> bound by storage space (yet), but it feels a bit weird.  I can't use
> a 
> MultiFieldQueryParser, because at the point where I parse the query,
> I 
> don't actually know the names of the fields.
> 
> Have I missed the correct way to do this?
> 
> Thanks in advance,
> Peter Pimley
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to