Duplicate DocValues causing indexing to fail for some installations in Jira 8.12+


We have a custom index defined in our addon ProForma like this (as per doc here https://developer.atlassian.com/server/jira/platform/index-document-configuration/):

<index-document-configuration entity-key="IssueProperty" key="jira-issue-forms-index-version">
    <key property-key="proforma.forms">
      <extract path="schemaVersion" type="number" alias="issueFormsVersion"/>

An example of what a proforma.forms property looks like is this:


So we’re trying to index on the schemaVersion in that property per issue.

The error the indexing reports is:

DocValuesField “ISSUEPROP_proforma.forms$schemaVersion” appears more than once in this document (only one value is allowed per field)

I did some searching and found this similar thread: Indexing an array in issue entity properties is broken on jira 8

However, in our case we’re not trying to index an array. There is an array in the entity property, but we’re not referencing it here.

I note that:

Does anyone have any tips or pointers on how to debug this further? Is there a particular set of services or managers we can use to interrogate how the indexer thinks it is going to index a particular issue to try and figure out where the duplicate is coming from?

Ideally if there’s anything we can do similar to the Scriptrunner solution that lets us give the customer scripts to paste into the Scriptrunner console that would be great.

Thanks in advance.