You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gilad Barkai (JIRA)" <ji...@apache.org> on 2012/09/20 13:51:07 UTC

[jira] [Created] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

Gilad Barkai created LUCENE-4411:
------------------------------------

             Summary: 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: 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


[jira] [Commented] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

Posted by "Gilad Barkai (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459543#comment-13459543 ] 

Gilad Barkai commented on LUCENE-4411:
--------------------------------------

When sampling is under effect, the original FacetRequest is replaces with a wrapper, which takes under account different sampling related parameters named OverSampledFacetRequest.
This "wrapping" class modifies only a small set of parameters in the request and should otherwise delegate everything to the original one - but it does not.
Some of the information that is lost from the original request: SortOrder, SortBy, number of results to lable, ResultMode and Depth.

A patch would be available shortly.
 
                
> 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: 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


[jira] [Assigned] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

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

Shai Erera reassigned LUCENE-4411:
----------------------------------

    Assignee: Shai Erera
    
> 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
>            Assignee: Shai Erera
>         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


[jira] [Updated] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

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

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

    Attachment: OversampleWithDepthTest.java

A Test revealing the bug for 3.6
                
> 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: 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


[jira] [Updated] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

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

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

    Attachment: OversampleWithDepthTest.java

A Test revealing the bug for Trunk
                
> 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: 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


[jira] [Updated] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

Posted by "Gilad Barkai (JIRA)" <ji...@apache.org>.
     [ 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


[jira] [Resolved] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

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

Shai Erera resolved LUCENE-4411.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.6.2
                   5.0
                   4.1
    Lucene Fields: New,Patch Available  (was: New)

Committed to 3.6.2, 4x, and trunk.

I also committed to lucene_solr_4_0 just in case we'll have another 4.0 candidate.

Thanks Gilad !
                
> 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
>            Assignee: Shai Erera
>             Fix For: 4.1, 5.0, 3.6.2, 4.0
>
>         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


[jira] [Commented] (LUCENE-4411) Depth requested in a facetRequest is reset when Sampling is in effect

Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-4411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462446#comment-13462446 ] 

Shai Erera commented on LUCENE-4411:
------------------------------------

Thanks Gilad ! Patch looks good, I'll commit it shortly. I'll also add a CHANGES entry.
                
> 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
>            Assignee: Shai Erera
>         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