lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Pimley <ppim...@semantico.com>
Subject Correct way to search across all fields
Date Fri, 17 Sep 2004 14:59:22 GMT

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: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message