lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Question about synonyms
Date Thu, 12 Jul 2007 09:23:10 GMT
Hello,

> 
> Brievly, what I'm looking for is a query that launch 
> something like this:
> 
> Giving the user search expression
> "A B C D"
> 
> Generated Lucene query :
> (myfield:I OR myfield:J OR myfield:O OR myfield:K)
> 
> if someone knows a way to reach this goal, please tell me how, i'm
> actually tearing my hairs on this issues and I really appreciate some
> help !!

IMHO, it does not make very much sense to me to rewrite a phraseQuery like "A B C D" into
a boolean OR query! 

But, if you really insist that it should work like this, I think it wont be to hard: 

You said,  myfield:("A B C D") is translated into PhraseQuery(myfield:"I J O K"). So, think
you should start from there, and get the term(s) out of the translated PhraseQuery and rewrite
this one into a boolean OR query.

I am by the way curious how the PhraseQuery works in combination with synonyms, because if
my phrase is like:

"A B C D",

will there be first look for a synonym for "A B C D", if not found for "A B C", then for 
"B C D", then for "A B" and "C D", and then for individual terms? Think when the phrase grows
the combinations grow pretty fast isnt?

Regards Ard

> 
> Thanks you, and thanks to the solr team for this amazing product that
> really improved by x100 the performance of our search engine !
> 
> Laurent
> 

Mime
View raw message