Thanks for the quick response everyone! It actually turned out I wasn't
using my bucket types correctly. The bucket type must correspond to the
Solr index I want to use, I know that now! Sorry for the confusion, I mixed
up my types and my buckets. Without your help it wouldn't have worked
though since I was serializing the JSON before giving it to Riak which was
unnecessary.

I did discover some interesting properties of allowing Riak to serialize
the json, versus serializing it before: I tested setting the content type
to json and Riak handled the indexing of it fine. The only difference is
that it doesn't seem to pick up the fields as map types and instead just
parses it directly into the Solr indices. I was doing this originally which
complicated the debugging since setting name_s to 'hello' would index the
field while just setting name to 'hello' would not index the field.

On Wed, Feb 10, 2016 at 8:00 AM, Vitaly E <13vitam...@gmail.com> wrote:

> I would try setting the content type to "application/json"
> http://docs.basho.com/riak/latest/dev/taste-of-riak/java/#Creating-Objects-in-Riak
> to see if it solves the problem. If it's absolutely necessary to send
> custom JSON to Riak client. That said, I've never actually tried this since
> the client handles serialization to JSON well enough.
>
> Vitaly
>
> On Wed, Feb 10, 2016 at 5:55 PM, Zeeshan Lakhani <zlakh...@basho.com>
> wrote:
>
>> Good point Vitaly, also possible.
>>
>>
>> Zeeshan Lakhani
>> programmer |
>> software engineer at @basho |
>> org. member/founder of @papers_we_love | paperswelove.org
>> twitter => @zeeshanlakhani
>>
>> On Feb 10, 2016, at 10:53 AM, Vitaly E <13vitam...@gmail.com> wrote:
>>
>> Hi Colin,
>>
>> The problem is that in your case JSON is interpreted as a String, as
>> opposed to a Map/POJO with fields.
>>
>> Is there any reason you don't rely on the JSON serialization built into
>> Riak Java client?
>>
>> Regards,
>> Vitaly
>>
>>
>>
>> On Wed, Feb 10, 2016 at 5:40 PM, Colin Walker <co...@musefind.com> wrote:
>>
>>> Hello everyone,
>>>
>>> Sorry for the basic question but I couldn't find the answer in the
>>> documentation. Does Riak search currently index documents sent as JSON? It
>>> doesn't look like it from the basic tests that I've run. I am using the new
>>> Solr search on Riak 2.1.3.
>>>
>>> When I send data to the bucket using a Map type in the java client
>>> everything is indexed and I can search for my data as expected. However,
>>> when I send the same Java map as JSON I cannot find a way to search within
>>> it. I am using the default index schema.
>>>
>>> Thanks everyone!
>>>
>>> Colin Walker
>>>
>>>
>>>
>>> _______________________________________________
>>> riak-users mailing list
>>> riak-users@lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>> _______________________________________________
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to