lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: How to search over all fields in a clean way?
Date Wed, 15 Aug 2007 11:01:01 GMT
copying all fields to a single searchable field is quite reasonable,  
and won't double your index size if you set the new field to be  


On Aug 15, 2007, at 5:38 AM, Ridwan Habbal wrote:

> Hello all,
> when we search over an index docs we use code such:
> Analyzer analyzer = new StandardAnalyzer();
> String defaultSearchField = "all";
> QueryParser parser = new QueryParser(defaultSearchField, analyzer);
> IndexSearcher indexSearcher = new IndexSearcher(this.indexDirectory);
> Hits hits =;
> The problem is when you want to search over ALL fields in each doc.  
> What's more is that the fields are created dynamically. In other  
> words, The number and identifiers of the fields of my docs vary  
> from each other. so it's irrational to type all fields names,  
> further more i don't know them.
> I thought of a primitive solution: copy all fields to one field,  
> however this doubles the index size, and it might conflict with  
> some fields names since the fields of docs are dynamic.
> could some one help me?
> Thanks in advance.
> Ridwan
> _________________________________________________________________
> Explore the seven wonders of the world
> US&form=QBRE

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message