Hi;

I use Solr 4.5.1 I have a case: When a user searches for some specific
keywords some documents should be listed at much more higher than its usual
score. I mean I have probabilities of which documents user may want to see
for given keywords.

I have come up with that idea. I can put a new field to my schema. This
field holds keyword and probability as payload. When a user searches for a
keyword I will calculate usual document score for given fields and also I
will make a search on payloaded field and I will multiply the total score
with that payload.

I followed that example:
http://sujitpal.blogspot.com/2013/07/porting-payloads-to-solr4.html#! owever
that example extends Qparser directly but I want to use capabilities of
edismax.

So I found that example:
http://digitalpebble.blogspot.com/2010/08/using-payloads-with-dismaxqparser-in.html
his
one exteds dismax and but I could not used payloads at that example.

I want to combine above to solutions. First solution has that case:

@Override
    public Similarity get(String name) {
        if ("payloads".equals(name) || "cscores".equals(name)) {
            return new PayloadSimilarity();
        } else {
            return new DefaultSimilarity();
        }
    }

However dismax behaves different. i.e. when you search for cscores:A it
changes that into that:

*+((text:cscores:y text:cscores text:y text:cscoresy)) ()*

When I debug it name is text instead of cscores and does not work. My idea
is combining two examples and extending edismax. Do you have any idea how
to extend it for edismax or do you have any idea what to do for my case.

*PS:* I've sent same question at Lucene user list too. I ask it here to get
an idea from Solr perspective too.

Thanks;
Furkan KAMACI

Reply via email to