Skip to content

Unexpected stored value for multivalued fields in riak search [JIRA: CLIENTS-514] #406

Open
@dellsystem

Description

@dellsystem

(Originally posted on the riak-users mailing list; duplicated here by request of @zeeshanlakhani in case it's an issue with the Python client)

Hi all,

I'm having an issue with stored multiValued fields in Riak search not being stored the way I would expect.

If I use the default schema, and store the following JSON document (from the documentation)

{"people_ss": ["Ryan", "Eric", "Brett"]}

and then search with the query "people_ss:Ryan", the document that I get back contains "people_ss": ["Ryan", "Eric", "Brett"], as I would expect.

However, if I instead create the document

{"people_ss": ["Ryan"]}

then searching with the query "people_ss:Ryan" results in a document with "people_ss": "Ryan", where the value associated with "people_ss" is a string, not a list of strings as I would expect.

I couldn't find anything about this in any of the Github issue trackers or the mailing list. Is this a bug, or desired behaviour? Is there a way to ensure that lists with a single element are stored in Solr (and retrieved) as lists, instead of as strings?

I'm using the official Riak Python client with Riak 2.1.1 and search enabled.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions