lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Massimo Ferrario (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5370) Sorting Facets on CategoryPath (Label)
Date Mon, 24 Mar 2014 10:22:45 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-5370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13944890#comment-13944890
] 

Massimo Ferrario commented on LUCENE-5370:
------------------------------------------

Yes, I did exaclty what you suggested: I created a simple comparator for FacetResultNode so
I can re-order list using string label, after computed the top-n facet.

Yes, I have d unique value per document, but my facet are strings (for example Company Name)
not number.
Thanks for suggestions.


> Sorting Facets on CategoryPath (Label)
> --------------------------------------
>
>                 Key: LUCENE-5370
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5370
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/facet
>    Affects Versions: 4.6
>            Reporter: Rob Audenaerde
>              Labels: features
>
> Facet support sorting through {{FacetRequest.SortOrder}}. This is used in the {{ResultSortUtils}}.
For my application it would be very nice if the facets can also be sorted on their label.

> I think this could be accomplished by altering {{FacetRequest}} with an extra enum {{SortType}},
and two extra {{Heap}}  in {{ResultSortUtils}} which instead of comparing the double value,
compare the CategoryPath.
> What do you think of this idea? Or could the same behaviour be accomplished in a different
way already?
> (btw: I tried building this patch on the trunk of lucene5.0; but I couldn't get the maven
build to build correctly. I will try again lateron on the 4.6 branch.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message