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 = indexSearcher.search(parser.parse(query));
 
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
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE

Reply via email to