I would think, with the current capabilities of lucene, denormalisation is
the solution. Create an extra indexed but not stored field called
"searchable-mash" which will hold the values from all fields with added
words to connect the data like "Male named George Bush whoes occupation is
President of USA ... Etc" so that you can run that generic query on that
field.

So you pass "searchable-mash: George bush and president" to query parser.

You will pay a penalty here, of bigger index and slower indexing.

-----Original Message-----
From: Anshul jain [mailto:[EMAIL PROTECTED] 
Sent: 21 September 2008 20:27
To: java-user@lucene.apache.org
Subject: Multi Field search without Multifieldqueryparser

Hi!

I've a lucene document structured like:
Field: Text
name: George Bush
Sex: Male
Occupation: President of USA

Now I can have two types of queries:
Structured query:
name: George Bush AND Occupation: President

Unstructured Query:
George Bush AND President.

After parsing it will become, value: George bush and president.
"value" is some default field that has to defined during parsing.

But as you can see that this unstructured query would not work because of
the structure of the lucene document. Now what I want to do is that when an
user gives an Unstructured query Lucene should search in all fields. (Multi
field query parser is an option but we have to define all the fields first,
and it can be expensive as the query can get really big).

I would really appreciate if you can help me out with this.

Regards,
Anshul Jain

---------------------------------------------------------------------
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