tracker issue : CF-4203271

select a category, or use search below
(searches all categories and all time range)
Title:

CFINDEX - Allow populating MultiValued Dynamic Field

| View in Tracker

Status/Resolution/Reason: To Track//NeedMoreInfo

Reporter/Name(from Bugbase): Brian Cassell / ()

Created: 08/14/2018

Components: Text Search, Solr Integration

Versions: 2016

Failure Type: Enhancement Request

Found In Build/Fixed In Build: /

Priority/Frequency: Normal /

Locale/System: / Windows 10 64 bit

Vote Count: 1

Hello,

Would be awesome if CFINDEX could index multivalued dynamic fields.

Currently only the built in field “category” supports multivalued fields by passing in a comma separated list of values.

We see the use case to add a custom/dynamic field for custom security, that would be multivalued and hold the list of userIDs that are allowed to access the SOLR document.

Schema XML
<dynamicField name="*_is"  type="sint"    indexed="true"  stored="true" multiValued="true" />

CFINDEX Field Name and Value
securitymap_is = “12,56,88”

By using a standard SOLR dynamic field naming syntax, CF can understand that the dynamic field is multivalued and will do the insert as an array of values [12][56][88], rather than a single text string with values and commas “12,56,88”.

Again, this is possible today ONLY with the category field. We would like to see it available with dynamic fields as well.

Attachments:

Comments:

I would also like to see this implemented
Vote by Chris R.
29492 | August 14, 2018 07:58:35 PM GMT
Brain/Chris, Did you by any chance check to see if this works if you update the document directly using the Solr admin console? Can you please share some details on the format in which you supplying the data for the multi-valued field.
Comment by Piyush K.
29816 | October 22, 2018 07:41:13 AM GMT
Brain/Chris, still waiting for you input. pls check my last comment.
Comment by Piyush K.
30497 | March 13, 2019 05:19:25 PM GMT
Changed example to string vs. int for simplicity in communication. Schema Has Dynamic Field defined as multiValued: <dynamicField name="*_is" type="string" indexed="true" stored="true" multiValued="true" /> Using JSON update handler: {"key":"calendar-2666","uid":"2666","title":"test","flavor_is":["apple","pear","peach"]} Results In multivalued dynamic field value is stored as an array of values in SOLR: { "key": "calendar-2666", "uid": "2666", "title": "test", "contents": [ "test" ], "flavor_is": [ "apple", "pear", "peach" ] } The issue is when adding the doc using CFINDEX. Setting the field as follows with CFINDEX: flavor_is="apple, pear, peach" Results in SOLR are a one element array with a list: "flavor_is": [ "apple, pear, peach" ], Using CFINDEX and passing a list into the provided category field works properly, storing as a multivalued array values in SOLR: cfindexing category="apple, pear, peach" Results in SOLR: "category": [ "apple", " pear", " peach" ], So - somehow there is some "magic" happening with the provided category SOLR field in conjunction with cfindex. Passing a list in loops through the values and adds them individually. This is the behavior we'd like to have with a custom field defined as multivalued. There appears an inability to populate custom field multivalued array values with cfindex, Unless there is a special undocumented syntax to push in an array of values. Thanks!
Comment by Brian C.
30537 | March 19, 2019 12:47:13 PM GMT