Indexing an array in issue entity properties is broken on jira 8

With Jira 7 we indexed references to issues in the following way:

{id: [1, 2, 3]}

in issue properties. And we then had a indexing configuration like this:

    <index-document-configuration entity-key="IssueProperty" key="atlas-crm-issue-entity-property">
        <key property-key="atlas_crm_entity">
            <extract path="id" type="number" alias="atlasReference"/>

We are coming from cloud and there this way of indexing arrays also works. But when we started testing on Jira 8 we noticed the following exception:

2019-03-14 12:37:35,513 http-nio-8080-exec-4 WARN admin 757x8030x1 vnxrua, /plugins/servlet/atlas-crm/api [c.a.jira.index.AccumulatingResultBuilder] DocValuesField "ISSUEPROP_atlas_crm_entity$id" appears more than once in this document (only one value is allowed per field)                     
java.lang.IllegalArgumentException: DocValuesField "ISSUEPROP_atlas_crm_entity$id" appears more than once in this document (only one value is allowed per field)                                                                                                                                                              
        at org.apache.lucene.index.SortedDocValuesWriter.addValue(                                                                                                                                                                                                                              
        at org.apache.lucene.index.DefaultIndexingChain.indexDocValue(                                                                                                                                                                                                                          
        at org.apache.lucene.index.DefaultIndexingChain.processField(                                                                                                                                                                                                                           
        at org.apache.lucene.index.DefaultIndexingChain.processDocument(                                                                                                                                                                                                                        
        at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(                                                                                                                                                                                                                 
        at org.apache.lucene.index.DocumentsWriter.updateDocument(                                                                                                                                                                                                                                   
        at org.apache.lucene.index.IndexWriter.updateDocument(                                                                                                                                                                                                                                          
        at com.atlassian.jira.index.WriterWrapper.updateDocuments(                                                                                                                                                                                                                                      
        at com.atlassian.jira.index.Operations$Update.perform(                                                                                                                                                                                                                                            
        at com.atlassian.jira.index.Operations$Completion.perform(                                                                                                                                                                                                                                        
        at com.atlassian.jira.index.QueueingIndex$CompositeOperation.perform(                                                                                                                                                                                                                          
        at com.atlassian.jira.index.DefaultIndexEngine$FlushPolicy.perform(                                                                                                                                                                                                                        
        at com.atlassian.jira.index.DefaultIndexEngine.write(                                                                                                                                                                                                                                     
        at com.atlassian.jira.index.DefaultIndex.perform(                                                                                                                                                                                                                                                
        at com.atlassian.jira.index.QueueingIndex$Task.perform(                                                                                                                                                                                                                                        
        at com.atlassian.jira.index.QueueingIndex$Task.index(                                                                                                                                                                                                                                          
        at com.atlassian.jira.index.QueueingIndex$                                                                                                                                                                                                                                            

Any ideas how we could solve this issue? I am not sure if this is a bug (but it worked with Jira 7) or if we should do this another way (which would suck because this would make it harder for our users to migrate between jira-server and jira-cloud…


You’re probably not going to like this but Atlassian doesn’t support array types on Issue Properties.

1 Like

You are right I dont like this :joy:

This has been supported on Cloud for more than 2 years now. That is why we thought it would work the same on server. But we actually managed to fix it by saving it in a string like this: "1 2 3" and then index as text. It wil tokenize it on the spaces and then you can actually search on the exact numbers.


Sorry and good luck :frowning: That’s a super nifty solution though. Thanks for the follow up.

1 Like

@m.kuijpers I am running into the same issue but I have not seen anywhere stated that arrays are not supported on Jira Server.

The documentation on entity properties for Jira Cloud and Jira Server (if arrays are supported) is super confusing (for reasons given here) and I have reported it to Atlassian already a couple of times.

I am still not sure if this is not a bug because like @m.kuijpers said this has been working on Jira Server so far…

Currently, specifying indexes for JSON arrays is not supported.


This seems to be a regression since this was working in Jira 7, but not 8. Consequently, I have created JRASERVER-72078 for the Jira Server team to address.