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

Hoss Man updated SOLR-2657:
---------------------------

    Attachment: SOLR-2657-test.patch

Updated tests showing that the problem affects both functions and globs when 
used with "score" w/o real fields -- but not transformers.

I think the crux of the problem is this logic in ReturnFields...

{code}
// Legacy behavior? "score" == "*,score"  Distributed tests for this
if( fields.size() == 1 && _wantsScore ) {
  _wantsAllFields = true;
}
{code}

...that situation isn't the only one where that if will evaluated to "true", 
because the code paths for globs and functions don't modify the "fields" list 
at all.

I'm not really sure if this is a symptom of a larger problem or not -- the 
class maintains both a "Set<String> fields" and a "Set<String> okFieldNames" 
I haven't yet fully grasped why we have both, and what they are used for but I 
do know that some code paths add to both, and other code paths only add to one 
or the other -- "addField" adds to both, so code paths that use it (like in the 
transfomer case) work fine.



> All fields returned if only psuedo fields are requested
> -------------------------------------------------------
>
>                 Key: SOLR-2657
>                 URL: https://issues.apache.org/jira/browse/SOLR-2657
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Hoss Man
>             Fix For: 4.0
>
>         Attachments: SOLR-2657-test.patch, SOLR-2657-test.patch
>
>
> Koji mentioned this in a comment in SOLR-1298...
> * {{fl=}} .. returns all stored fields (expected, backcompat)
> * {{fl=*}} .. returns all stored fields (expected, backcompat)
> * {{fl=score,*}} .. returns the score psuedo field and all stored fields 
> (expected, backcompat)
> * {{fl=score}} .. returns the score psuedo field and all stored fields 
> (expected, backcompat)
> * {{fl=score,price}} .. returns the score psuedo field and the stored price 
> field (expected, backcompat)
> * {{fl=log(price)}} .. returns the log(price) psuedo field (expected)
> * {{fl=score,log(price)}} .. returns the score and log(price) psuedo fields 
> as well as *all* of the stored fields (*NOT EXPECTED*)
> The problem seems to be that when the entire fl is made up of psuedo fields, 
> and one of them is score, the legacy behavior for an fl of only score is used 
> (instead of recognizing that other "fields" were requested, so we should not 
> output all stored fields

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to