On Tue, 2006-06-06 at 10:47 +0100, digby wrote: > I was wondering this exact question, but MultiFieldQueryParser still > requires you to specify the field names. In my application I don't know > the field names (they're automatically generated from beans using > BeanUtils.getProperties()), so I've resorted to concatenating all the > fields into a single "content" field which I then search on (I also have > the individual fields added too). > > Would this be the correct approach for what I'm trying to do, or is > there another "AllFieldsQueryParser" I could use?
If you don't know the field names you'll have to use the IndexReader to iterate available fields: http://lucene.apache.org/java/docs/api/org/apache/lucene/index/IndexReader.html getFieldNames(IndexReader.FieldOption fldOption) Get a list of unique field names that exist in this index and have the specified field option information. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]