YZ search schema question

Zeeshan Lakhani zlakhani at basho.com
Tue Feb 24 10:18:17 EST 2015


Just for the query itself, then yep :). 


Zeeshan Lakhani
programmer | 
software engineer at @basho | 
org. member/founder of @papers_we_love |
twitter => @zeeshanlakhani

> On Feb 24, 2015, at 10:11 AM, Michael Martin <mmartin4242 at gmail.com> wrote:
> 
> Hi Zeeshan,
> 
> Actually, I was trying to make this harder than it really is. The easiest way to do this appears to be simply ANDing the two values in the query parms. 
> 
> Thanks,
> Michael Martin
> 
> 
> 
> On Tue, Feb 24, 2015 at 9:59 AM, Zeeshan Lakhani <zlakhani at basho.com <mailto:zlakhani at basho.com>> wrote:
> Hello Michael,
> 
> You should be able to then set a field to be multiValued in your schema that would capture your use-case. You can find more info here -> http://docs.basho.com/riak/latest/dev/advanced/search-schema/ <http://docs.basho.com/riak/latest/dev/advanced/search-schema/> and http://stackoverflow.com/a/5800830 <http://stackoverflow.com/a/5800830>. 
> 
> Zeeshan Lakhani
> programmer | 
> software engineer at @basho | 
> org. member/founder of @papers_we_love |
> twitter => @zeeshanlakhani
> 
>> On Feb 24, 2015, at 9:35 AM, Michael Martin <mmartin4242 at gmail.com <mailto:mmartin4242 at gmail.com>> wrote:
>> 
>> Hi all,
>> 
>> I have a need to index on two separate fields in a json document - rather, I need to concatenate the two and index on that.
>> 
>> Short of duplicating both into a single new item in my json document, how would I go about doing that?
>> 
>> Example:
>> 
>> Given this JSON:
>> 
>> { "parent": "/path/to/parent",
>>   "self": "myname"
>> }
>> 
>> How would I build a schema that would search on "/path/to/parent/myname" without doing something like:
>> 
>> { "parent": "/path/to/parent",
>>   "self": "myname",
>>   "fullpath": "/path/to/parent/myname"
>> }
>> 
>> Thanks,
>> Michael Martin
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com <mailto:riak-users at lists.basho.com>
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com <http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20150224/b1796086/attachment-0002.html>


More information about the riak-users mailing list