lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fehling <>
Subject Re: Synonym configuration not working?
Date Mon, 16 Jan 2012 07:18:47 GMT
Yes and No.
If using Synonyms funtionality out of the box you have to do it at index time.

But if using it at query time, like we do, you have to do some programming.
We have connected a thesaurus which is actually using synonyms functionality at query time.
There are some pitfalls to take care of.


Am 15.01.2012 07:07, schrieb Michael Lissner:
> Just replying for others in the future. The answer to this is to do synonyms at index
time, not at query time.
> Mike
> On Fri 06 Jan 2012 02:35:23 PM PST, Michael Lissner wrote:
>> I'm trying to set up some basic synonyms. The one I've been working on is:
>> us, usa, united states
>> My understanding is that adding that to the synonym file will allow users to search
for US, and get back documents containing usa or united
>> states. Ditto for if a user puts in usa or united states.
>> Unfortunately, with this in place, when I do a search, I get the results for items
that contain all three of the words - it's doing an AND of
>> the synonyms rather than an OR.
>> If I turn on debugging, this is indeed what I see (plus some stemming):
>> (+DisjunctionMaxQuery(((westCite:us westCite:usa westCite:unit) | (text:us text:usa
text:unit) | (docketNumber:us docketNumber:usa
>> docketNumber:unit) | ((status:us status:usa status:unit)^1.25) | (court:us court:usa
court:unit) | (lexisCite:us lexisCite:usa lexisCite:unit)
>> | ((caseNumber:us caseNumber:usa caseNumber:unit)^1.25) | ((caseName:us caseName:usa
>> Am I doing something wrong to cause this? My defaultOperator is set to AND, but I'd
expect the synonym filter to understand that.
>> Any help?
>> Thanks,
>> Mike

View raw message