You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cassandra Targett (JIRA)" <ji...@apache.org> on 2017/11/09 17:52:00 UTC

[jira] [Commented] (SOLR-2140) Distributed search treats "score" as multivalued if schema has matching multivalued dynamicField

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

Cassandra Targett commented on SOLR-2140:
-----------------------------------------

I can't reproduce this on 7.1, so I think some change in the intervening years has fixed this.

For the query:

{code}
http://localhost:8983/solr/gettingstarted/select?fl=score,id&q=*:*&wt=xml&shards=localhost:8983/solr/gettingstarted_shard1_replica_n1,localhost:8983/solr/gettingstarted_shard2_replica_n4
{code}

I get:

{code}
<result name="response" numFound="33" start="0" maxScore="1.0">
<doc>
<str name="id">GB18030TEST</str>
<float name="score">1.0</float>
</doc>
<doc>
<str name="id">IW-02</str>
<float name="score">1.0</float>
</doc>
<doc>
<str name="id">MA147LL/A</str>
<float name="score">1.0</float>
</doc>
<doc>
<str name="id">adata</str>
<float name="score">1.0</float>
</doc>
{code}

> Distributed search treats "score" as multivalued if schema has matching multivalued dynamicField
> ------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2140
>                 URL: https://issues.apache.org/jira/browse/SOLR-2140
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4.1
>            Reporter: Hoss Man
>
> http://search.lucidimagination.com/search/document/e8d10e56ee3ac24b/solr_with_example_jetty_and_score_problem
> {noformat}
> : But when I issue the query with shard(two instances), the response XML will
> : be like following.
> : as you can see, that score has bee tranfer to a element <arr> of <doc>
>         ...
> : <arr name="score">
> : <float name="score">1.9808292</float>
> : </arr>
> The root cause of these seems to be your catchall dynamic field
> declaration...
> :    <dynamicField name="*" type="text" indexed="true" stored="true"
> :                             multiValued="true" termVectors="true"
> : termPositions="true"
> :                             termOffsets="true" omitNorms="false"/>
> ...that line (specificly the fact that it's multiValued="true") seems to
> be confusing the results aggregation code.  my guess is that it's
> looping over all the fields, and looking them up in the schema to see if
> they are single/multi valued but not recognizing that "score" is
> special.
> {noformat}
> This is trivial to reproduce using the example schema, just add a dynamicField type like this...
> {noformat}
> <dynamicField name="*" type="ignored" multiValued="true" />
> {noformat}
> Load up some data, and then hit this URL...
> http://localhost:8983/solr/select?q=*:*&fl=score,id&shards=localhost:8983/solr/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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