Hi all,

I'm looking for the best way to inflate a query, so a query like: "synchronous 
AND colour" -- will become something like this:

"(synchronous OR asynchronous OR bsynchornous OR synchronos OR asynchronos OR 
bsynchornos) AND (colour OR acolour OR bcolour OR color OR acolor OR bcolor)".

I'm doing two-fold action - creating another instance of the word without a 
specific letter(s), and then adding initial letters to all the resulting set of 
words. The resulting list of words should be OR'ed and replace the original 
word from the original query (so "colour" becomes "(colour OR acolour OR 
bcolour OR color OR acolor OR bcolor)"). This is for making Hebrew queries 
return more precise results, don't try to find the logic in English :)

What I'm looking for is the proper way and place to make the actual query 
expanding process. Keep in mind I will want to be able to access the complete 
list of words later so I could use them to highligh results in the opened 
document. If I could access the terms object directly somehow and replace each 
item with and OR'd object that would be ideal I think.

BTW, I have already established that I will have to write my own query parser 
derived from QueryParserBase directly, and my own Lexer, since Hebrew has some 
unique stuff that sometimes confuse Lucene's default. The tweaks I'm about to 
make should work for both Hebrew AND English, so perhaps will become the 
standard way of doing things...

Thanks in advance for any help,

Itamar.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to