Skip to content

Programmatically adding search indexes to CRDTs [JIRA: CLIENTS-1028] #331

@mikrofusion

Description

@mikrofusion

It appears I can use ````riakc_pb_socket.set_search_index``` to set a search index to a bucket within a bucket type, but not to the overall type programatically.

I am trying to find a way to get the same behavior I can get using riak-admin on the command line.

For example, if I run

riak-admin bucket-type update counters '{"props":{"search_index":"counter_search"}}'

I can see that the counter_search index gets added to the console:

screen shot 2016-11-10 at 4 34 15 pm

But, if I do this via code:

  :ok = :riakc_pb_socket.set_search_index(shared.pid, {"counters", shared.bucket}, "counter_search")

The result is that no index is found:

screen shot 2016-11-10 at 4 33 41 pm

I've tried variations of set_search_index with no avail:

  :ok = :riakc_pb_socket.set_search_index(shared.pid, "counters", "counter_search")

Thanks in advance for any help you can provide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions