lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Gazzarini <a.gazzar...@sease.io>
Subject Re: Contextual Synonym Filter
Date Mon, 03 Sep 2018 13:59:11 GMT
Hi Luca,
I believe this is not an easy task to do passing through Solr/Lucene 
internals; did you try to use what Solr offers out of the box?
For example, you could define several fields associated where each 
corresponding field type uses a different synonym set. So you would have

  * F1 -> FT1 -> SYNSET1
  * F2 -> FT2 -> SYNSET2
  * ...

if you query using *fq=F1:something* then the *FT1* (and the *SYNSET1*) 
will be used, if you query using *fq=F2:something* then the *FT2* (and 
the *SYNSET2*) will be used, and so on

I don't know your context so my suggestion could be absolutely in the 
wrong path

Best,
Andrea

On 03/09/2018 15:41, Vergantini Luca wrote:
>
> I need to create a contextual Synonym Filter:
>
> I need that the Synonym Filter load different synonym configuration 
> based on the fq query parameter.
>
> I’ve already modified the SynonymGraphFilterFactory to load from DB 
> (this is another requirement) but I can’t understand how to make the 
> fq parameter arrive to the Factory.
>
> Maybe I need a Query Parser plugin?
>
> Please help
>
>
>
> Luca Vergantini
>
> Whitehall Reply
> Via del Giorgione, 59
> 00147 - Roma - ITALY
> phone: +39 06 844341
> l.vergantini@reply.it <mailto:l.vergantini@reply.it>
> www.reply.it
>
> Whitehall Reply


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