Thank you, Alessandro,

I was trying these options before replying.

Yes, I am looking to generate a score for a query with synonym expansion
(not binary feature)

I can go with the "title" field and have that include the synonyms in
analysis. Only problem is that the number of fields and number of synonyms
files are quite a lot (~ 8 synonyms files) due to different weightage and
type of expansion (exact vs partial) based on these. Hence going with this
approach would mean creating more fields for all these synonyms
(synonyms.txt)

So, I am looking to build a custom parser for which I could supply the file
and the field and that would expand the synonyms and return a score.


Thanks,
Roopa




On Mon, Feb 12, 2018 at 6:23 AM, Alessandro Benedetti <a.benede...@sease.io>
wrote:

> In the end a feature will just be a numerical value.
> How do you plan to use synonyms in a field to generate a numerical feature
> ?
>
> Are you planning to define a binary feature for a field, in case there is a
> match on the synonyms ?
> Or a feature which contains a score for a query ( with synonyms expansion)
> ?
>
> I would start from the SolrFeature, let's assume the "title" field has a
> field type that includes synonyms ( query time) :
>
> {
>     "store" : "featureStore",
>     "name" : "hasTitleMatch",
>     "class" : "org.apache.solr.ltr.feature.SolrFeature",
>     "params" : {
>       "fq": [ "{!field f=title}${query}" ]
>     }
>
> Query time analysis will be applied and synonyms expanded.
> So the feature will have a value , which is the score returned for the
> query
> and the document ( under scoring) .
> You can play with that and design the feature that best fit your idea.
>
> Regards
>
>
>
>
>
>
>
>
> -----
> ---------------
> Alessandro Benedetti
> Search Consultant, R&D Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Reply via email to