lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilad Barkai (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect
Date Mon, 24 Sep 2012 14:32:07 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gilad Barkai updated LUCENE-4411:
---------------------------------

    Attachment: LUCENE-4411.patch

Attached a proposed fix + test.

Delegating is impossible as {{FacetRequest}}'s getters are {{final}}. The only way to 'delegate'
the information is using the setters in the wrapping class (e.g setDepth(original.getDepth()).
This solution does not seem the right one, but other approaches involves changing much more
code and reducing the amount of protection the public API offers (e.g the user will find it
easier to break something).

The patch also introduce (the missing) delegation of the {{SortBy}}, {{SortOrder}}, {{numResultsToLable}}
and {{ResultMode}} methods.

Somewhat out of scope of the issue - I tried to figure out why the wrapping and keeping the
??original?? request is important:
The ??count?? (number of categories to return) is {{final}}, set at construction. While Sampling
is in effect, in order to better the chances of 'hitting' the true top-k results, the notion
of oversampling is introduced, which asks for more than just K (e.g 3 * K results) - so another
request should be made. The 'original' request is saves so the end-result would hold the original
request, and not the over-sampled one (every {{FacetResult}} has its originating {{FacetRequest}}).

                
> Depth requested in a facetRequest is reset when Sampling is in effect
> ---------------------------------------------------------------------
>
>                 Key: LUCENE-4411
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4411
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/facet
>    Affects Versions: 3.6.1, 5.0, 4.0
>            Reporter: Gilad Barkai
>         Attachments: LUCENE-4411.patch, OversampleWithDepthTest.java, OversampleWithDepthTest.java
>
>
> FacetRequest can be set a Depth parameter, which controls the depth of the result tree
to be returned.
> When Sampling is enabled (and actually used) the Depth parameter gets reset to its default
(1).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message