Rusty Klophaus rusty at
Tue Feb 22 15:44:23 EST 2011

Hi Yury,

The term "document" is a hold over from the Solr/Lucene way of looking at
things. If you are calling search:index_doc/N directly, then the DocID is
just some arbitrary primary key that you give to your data, sort of like the
Riak Object's key.

Not sure what you mean about indexing data implicitly. If you are asking if
you can index an object that already exists in the system, then the answer
is no. You would need to read the object and then write it back to endix it.

Also, the 'search' module is only really recommended for getting familiar
with the system since you need to run it locally on the node running Riak
Search. You shouldn't call search.erl from your application, you should
instead interact with Riak Search by installing the Search commit hook (via
"bin/search-cmd install BUCKET") and then using one of the existing clients
that support's Riak Search (Python, PHP, or Erlang) or through the Solr


On Tue, Feb 22, 2011 at 6:49 AM, Yury Dorofeev <u.dorofeev at> wrote:

> Hi!
>   In chapter "Riak Search Schema" the notation "document" is used.
> What is that? Why do we need it?
> Parameters are:
> <INDEX> – The name of the index.
> <DocID> – The document ID.
> <Fields> – A key/value list of fields to index.
> I have
> Bucket=User
> Key=user_name
> Value=[{first_name, value}, {second_name, value}, {e-mail, value}]
> and I want to index first_name and secons_name
> search:index_doc(<<"my_index">>, <<?>>, [{<<"first_name">>,
> <<value>>}, {<<"second_name">>, <<value>>}])
> what should be instead of "?"
> Is there mechanism to index data implicitly by specifing the field
> name only (without providing the real values)?
> Regards Yury, Uppsala University, Sweden
> _______________________________________________
> riak-users mailing list
> riak-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list