You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by flyingeagle-de <fl...@yahoo.de> on 2012/06/26 10:42:42 UTC

synonyms + default "and"

Hello,

I've a problem using the synonyms.txt and a default "and" in my search.

Using a lot of fields in my query I want them all to be combined with "and"
except the synonyms.

Having this entry in the synonyms.txt
...
test1, test2, test3
...

and querying for test1 only matches when the document also contains test2
and test3.

Is there a way to tell the solr.SynonymFilterFactory to combine the synonyms
with an "or"?


--
View this message in context: http://lucene.472066.n3.nabble.com/synonyms-default-and-tp3991299.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: synonyms + default "and"

Posted by Upayavira <uv...@odoko.co.uk>.
Try using expand=true at both index and query time. Then all terms will
be there in all queries.

Upayavira

On Tue, Jun 26, 2012, at 01:42 AM, flyingeagle-de wrote:
> Hello,
> 
> I've a problem using the synonyms.txt and a default "and" in my search.
> 
> Using a lot of fields in my query I want them all to be combined with
> "and"
> except the synonyms.
> 
> Having this entry in the synonyms.txt
> ...
> test1, test2, test3
> ...
> 
> and querying for test1 only matches when the document also contains test2
> and test3.
> 
> Is there a way to tell the solr.SynonymFilterFactory to combine the
> synonyms
> with an "or"?
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/synonyms-default-and-tp3991299.html
> Sent from the Solr - User mailing list archive at Nabble.com.