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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Sebastian Nagel (Jira)
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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply | Threaded
Open this post in threaded view
|

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

Sebastian Nagel (Jira)

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

Hoss Man commented on SOLR-2140:
--------------------------------

A workarround is to include this in your schema.xml...

{noformat}
   <field name="score" type="ignored" multiValued="false" />
{noformat}

..this key is to make sure solr knows "score" is not multiValued

> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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