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

Chris M. Hostetter updated SOLR-15048:
--------------------------------------
    Attachment: SOLR-15048.patch
        Status: Open  (was: Open)

There are twe distinct but interconnected problems that were contributing to 
the symptoms i was seeing before (which were only a subset of the actual 
problems involved, due to the natural order of the docs in my test)

* the abstract base "strategy" classes expect that (in the nullPolicy=expand) 
case _if_ a null doc was boosted, then it would not *also* be listed in the 
'nullScores' array (and the nullScoreIndex would not be increased in the "null 
group but boosted" code path of the finish method())   -- but not all of the 
concrete strategy impls were returning immediately when detecting a boosted 
doc, meaning that "extra" scores would be in the nullScores array, leading to 
using the wrong index to try nad find the score of (non-boosted) null docs
* the finish method in the abstract base "strategy" class takes care of purging 
any "group heads" that have the same group value as a known boosted doc, but 
this code wasn't also cleaning the "nullDoc" group head of the null group (ie: 
it assumed nullPolicy=ignore or nullPolicy=expand)

I'm attaching a patch with more beefed up testing, and the minimal changes to 
get all of hte various strategies/collectors in agreement of how to deal with 
null groups -- i plan to do a lot of deduplication refactoring prior to 
committing (copy/past coding appears to be how we got in this mess) but i 
wanted to post the patch in this state since it makes it more evident where the 
"wrong" code was.

> collapse + query elevation behaves inconsistenty w/ 'null group' docs 
> depending on group head selector
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-15048
>                 URL: https://issues.apache.org/jira/browse/SOLR-15048
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Chris M. Hostetter
>            Assignee: Chris M. Hostetter
>            Priority: Major
>         Attachments: SOLR-15048.patch, SOLR-15048.patch, SOLR-15048.patch
>
>
> while working on SOLR-15047, I realized I wasn't really clear on what the 
> _expected_ semantics of were suppose to be when "boosting"
>   docs that had null values in the collapse field.
> I expanded on my test from that jira, to demonstrate the logic i (thought) i 
> understood from the Ord based collector - but then discovered that depending 
> on the group head selector used (ie: OrdScoreCollector vs 
> OrdFieldValueCollector+OrdIntStrategy vs 
> OrdFieldValueCollector+OrdValueSourceStrategy , etc...) you get different 
> behavior - not just in what group head is selected, but even when the 
> behavior should be functionally equivilent, you can get different sets of 
> groups. (even for simple string field collapsing, independent of the bugs in 
> numeric field collapsing).
>  
> I have not dug into WTF is happening here, but I'll attach my WIP test



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to