You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Matt Weber (JIRA)" <ji...@apache.org> on 2009/05/09 00:44:45 UTC

[jira] Created: (SOLR-1156) Sort TermsComponent results by frequency

Sort TermsComponent results by frequency
----------------------------------------

                 Key: SOLR-1156
                 URL: https://issues.apache.org/jira/browse/SOLR-1156
             Project: Solr
          Issue Type: Improvement
    Affects Versions: 1.4
            Reporter: Matt Weber


TermsComponent should be able to return results sorted by frequency.

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


[jira] Updated: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Matt Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Weber updated SOLR-1156:
-----------------------------

    Attachment: SOLR-1156.patch

Updated to use BoundedTreeSet instead of a regular TreeSet.  Don't know why I didn't use this in the first place.

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Commented: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708158#action_12708158 ] 

Yonik Seeley commented on SOLR-1156:
------------------------------------

Thanks Matt!
This should probably use a BoundedTreeSet or a PriorityQueue to avoid keeping (and ordering) all of the terms in memory?

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Updated: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Matt Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Weber updated SOLR-1156:
-----------------------------

    Attachment: SOLR-1156.patch

Added some unit tests.

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Updated: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Matt Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Weber updated SOLR-1156:
-----------------------------

    Attachment: SOLR-1156.patch

I have implemented TermsComponent sorting by frequency.  I use the same technique as facet sorting.  Enable sorting by the parameter "terms.sort=true|false".

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Updated: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Matt Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Weber updated SOLR-1156:
-----------------------------

    Attachment: SOLR-1156.patch

Updated patch to resolve conflicts with the recent changes to trunk (rev. 773446).  Also to keep the sort parameter similar to the facet.sort parameter, you can specify terms.sort=count|index instead of true|false.  Default is to sort by count.

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Commented: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12745126#action_12745126 ] 

Yonik Seeley commented on SOLR-1156:
------------------------------------

Looks simple enough - I'll commit soon if there are no objections.

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Resolved: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yonik Seeley resolved SOLR-1156.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4

Committed.  Thanks Matt!
It would be great if you could update the docs on the wiki too.

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>             Fix For: 1.4
>
>         Attachments: SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Commented: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Matt Weber (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708223#action_12708223 ] 

Matt Weber commented on SOLR-1156:
----------------------------------

The current tests pass:

    [junit] Running org.apache.solr.handler.component.TermsComponentTest
    [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 6.944 sec


I will work on some unit tests for the new sorting functionality.

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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


[jira] Commented: (SOLR-1156) Sort TermsComponent results by frequency

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708212#action_12708212 ] 

Yonik Seeley commented on SOLR-1156:
------------------------------------

It would be nice for this to have some tests before it's committed
Actually, does this pass the current tests since the default sort order was changed and the tests weren't changed?  perhaps if the current tests are small enough and never test for order of results, they do still pass?

> Sort TermsComponent results by frequency
> ----------------------------------------
>
>                 Key: SOLR-1156
>                 URL: https://issues.apache.org/jira/browse/SOLR-1156
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>            Reporter: Matt Weber
>         Attachments: SOLR-1156.patch, SOLR-1156.patch, SOLR-1156.patch
>
>
> TermsComponent should be able to return results sorted by frequency.

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