[jira] Commented: (SOLR-385) facet sorting with relevancy

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-385) facet sorting with relevancy

Hudson (Jira)

    [ https://issues.apache.org/jira/browse/SOLR-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921473#action_12921473 ]

Peter Karich commented on SOLR-385:
-----------------------------------

When I am thinking a bit more about this issue. For the 'ungeneralized version' - sorting against the maximum of the score (or any field?)- we can use the group-feature!

http://wiki.apache.org/solr/FieldCollapsing

The Solution - I think - would be the following request:

http://localhost:8983/solr/select/?q=hard&group=true&group.field=manu_exact&group.limit=1&debug=true&fl=*,score

the collapse groups are ordered by the maxScore I think + hope ;-)

So it is the same as we want:

http://localhost:8983/solr/select/?q=hard&facet=true&facet.field=manu_exact&debug=true&fl=*,score&facet.stats.sort=max(score) desc

Now one remaing task could be to extend this feature with max, min and mean functions ...


here is the 'group' result:

{code}
<lst>
<str name="groupValue">Maxtor Corp.</str>

<result name="doclist" numFound="1" start="0" maxScore="0.70904505">

<doc>
<float name="score">0.70904505</float>

<arr name="cat">
<str>electronics</str>
<str>hard drive</str>
</arr>

<arr name="features">
<str>SATA 3.0Gb/s, NCQ</str>
<str>8.5ms seek</str>
<str>16MB cache</str>
</arr>
<str name="id">6H500F0</str>
<bool name="inStock">true</bool>
<str name="manu">Maxtor Corp.</str>
<date name="manufacturedate_dt">2006-02-13T15:26:37Z</date>

<str name="name">
Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300
</str>
<int name="popularity">6</int>
<float name="price">350.0</float>
<str name="store">45.17614,-93.87341</str>
</doc>
</result>
</lst>

<lst>
<str name="groupValue">Samsung Electronics Co. Ltd.</str>

<result name="doclist" numFound="1" start="0" maxScore="0.5908709">

<doc>
<float name="score">0.5908709</float>

<arr name="cat">
<str>electronics</str>
<str>hard drive</str>
</arr>

<arr name="features">
<str>7200RPM, 8MB cache, IDE Ultra ATA-133</str>

<str>
NoiseGuard, SilentSeek technology, Fluid Dynamic Bearing (FDB) motor
</str>
</arr>
<str name="id">SP2514N</str>
<bool name="inStock">true</bool>
<str name="manu">Samsung Electronics Co. Ltd.</str>
<date name="manufacturedate_dt">2006-02-13T15:26:37Z</date>

<str name="name">
Samsung SpinPoint P120 SP2514N - hard drive - 250 GB - ATA-133
</str>
<int name="popularity">6</int>
<float name="price">92.0</float>
<str name="store">45.17614,-93.87341</str>
</doc>
</result>
</lst>
{code}

this would be the faceting result:

{code}
<lst name="facet_fields">
<lst name="manu_exact">
<int name="Maxtor Corp." score="0.70904505">1</int>
<int name="Samsung Electronics Co. Ltd." score="0.5908709">1</int>
...
{code}

> facet sorting with relevancy
> ----------------------------
>
>                 Key: SOLR-385
>                 URL: https://issues.apache.org/jira/browse/SOLR-385
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Dmitry Degtyarev
>            Priority: Minor
>
> Sometimes facet sort based only on the count of matches is not relevant, I need to sort not only by the count of matches, but also on the scores of matches.
> In the most simple way it must sort categories by the sum of item scores that matches query and the category. In the best way there should be some coefficient to multiply Scores or some function.
> Is it possible to implement such a behavior for facet sort?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]