lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <mkhlud...@griddynamics.com>
Subject Re: Solr synonyms logic
Date Sat, 21 Feb 2015 14:19:15 GMT
Hello,

usually debugQuery=true output explains a lot of such details.

On Sat, Feb 21, 2015 at 10:52 AM, davym <dmeybos@luon.com> wrote:

> Hi all,
>
> I'm querying a recipe database in Solr. By using synonyms, I'm trying to
> make my search a little smarter.
>
> What I'm trying to do here, is that a search for pastry returns all
> lasagne,
> penne & cannelloni recipes.
> However a search for lasagne should only return lasagne recipes.
>
> In my synonyms.txt, I have these lines:
> ---------------------
> lasagne,pastry
> penne,pastry
> cannelloni,pastry
> ---------------------
>
> Filter in my scheme.xml looks like this:
> <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
> ignoreCase="true" expand="true"
> tokenizerFactory="solr.WhitespaceTokenizerFactory" />
> Only in the index analyzer, not in the query.
>
> When using the Solr analysis tool, I can see that my index for lasagne has
> a
> synonym pastry and my query only queries lasagne. Same for penne and
> cannelloni, they both have the synonym pastry.
>
> Currently my Solr query for lasagne also returns all penne and cannelloni
> recipes. I cannot understand why this is the case.
>
> Can someone explain this behaviour to me please?
>
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-synonyms-logic-tp4187827.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mkhludnev@griddynamics.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message