Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3436

Statistics Shard Corrupts owningComm field

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6, 6.0
    • Fix Version/s: 5.7, 6.1, 7.0
    • Component/s: Statistics
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      8
    • Documentation Status:
      Needed

      Description

      Filing this ticket on behalf of a stackoverflow user. While examing the shards in my repository, I see similar effects.

      See
      http://stackoverflow.com/questions/41447122/solr-change-string-field-to-integer-multivalued/41447776#41447776


      Background: I executed sharding by year in my statistics solr core, using a dspace command:

      [dspace]/bin/dspace stats-util -s

      According to: https://wiki.duraspace.org/display/DSDOC5x/SOLR+Statistics+Maintenance#SOLRStatisticsMaintenance-SolrShardingByYear

      After that, there are several cores, divided by year: statistics, statistics-2015, statistics-2014, and so on.

      However, multivalued fields are incorrect now, they seem to be a string:

      "owningComm": [
      "8,2,1,2,1,1"
      ]

      When we try to query, for example, owningComm:1 no results are given.

      The correct behaviour, before sharding, was as an "array" of integers:

      "owningComm": [
      5,
      2,
      1,
      2,
      1,
      1
      ]

      The field in schema.xml of Solr 4 is:

      <field name="owningComm" type="integer" indexed="true" stored="true" required="false" multiValued="true" />

      I already tried to tokenize the string with commas, but without success.

      Is there any way to update this field to integers again? Removing the quotes or something like that?

      We have millions docs stored.

      Thanks in advance.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                terrywbrady Terry Brady
                Reporter:
                terrywbrady Terry Brady
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: