QUERY: riaksearch

Mathias Meyer mathias at basho.com
Wed Apr 13 06:15:06 EDT 2011


Riak Search somewhat denormalizes nested structures in a JSON-ish structure, which the PHP client creates from the associative array, unless you specify a different content type. The dot notation below actually dereferences a Riak Search index called contact1, not the nested property contact1.

You can query the separate fields by using an underscore instead, so you would run this instead:


Mathias Meyer
Developer Advocate, Basho Technologies

On Mittwoch, 13. April 2011 at 10:23, khyqo wrote: 
> good day everyone.. i am new to riak.. while i am doing some testing, i 
> encountered a problem when retrieving data using riaksearch.. i am not 
> sure if im doing it the right way.. i am using php (from 
> https://github.com/basho/riak-php-client) to test..
> sample data:
> array(
>  "fname"=>"test",
>  "lname"=>"yadda",
>  "contact"=>array(
>  "phone1"=>"9999999",
>  "phone2"=>"8888888"
>  )
> )
> i was able to retrieve data using
> $client->search("bucket","fname:test")->run()
> $client->search("bucket","lname:yadda")->run()
> but the problem is that i cant get phone1 and/or phone2 values.. i tried
> $client->search("bucket","contact.phone1:9999999")->run()
> $client->search("bucket","contact->phone1:9999999")->run()
> but to no avail.. suggestions/recommendations would be highly appreciated..
> thank you in advance..
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

More information about the riak-users mailing list