Re: Riak Search Schema Question

2014-10-27 Thread Andrew Zeneski
I know this might sound strange, but what if the data was formatted like so: {"id": 1, stats: [ {"stat1": {"name":"stat1", "group": "x", "value": 1}}, {"stat2": {"name": "stat2", "group": "x", "value": 5}} ] } Would the default extractor flatten this to : stats.stat1.name = stat1, stats.stat1.gr

Re: Riak Search Schema Question

2014-10-26 Thread Andrew Zeneski
That would be ideal I know, but would require a huge effort and is something I am saving as a last resort. A custom extractor should allow me to massage the value into a more index friendly format before sending to Solr but allowing the value to remain in its current form. I have no experience wit

Re: Riak Search Schema Question

2014-10-26 Thread Alexander Sicular
That might happen. Could you rearrange your data to look like Id: ... , stats: { Stat1: [ ... ], Stat2: [ ... ], ... } Then you could do a stats_stat1 > 1 query. It's also more space efficient. Derived vs explicit naming. Stat(N) could even be an array of hashes like [{value:..., dates

Re: Riak Search Schema Question

2014-10-26 Thread Andrew Zeneski
Yes right, I was tired when I typed this; stats should be an array: {"id": 1, "stats": [{ "name": "stat1", "value": 1 }, {"name": "stat2", "value": 5}]} {"id": 2, "stats": [{ "name": "stat3", "value": 2 }, {"name": "stat1", "value": 3}]} {"id": 3, "stats": [{ "name": "stat2", "value": 3 }, {"name"

Re: Riak Search Schema Question

2014-10-25 Thread Alexander Sicular
Haven't tried it out but should stats be an array? And the query would be something like Stats_name = stat1 and stats_value > 1 I think the extractor flattens everything and separates with underscores. -Alexander @siculars http://siculars.posthaven.com Sent from my iRotaryPhone > On Oct 2

Riak Search Schema Question

2014-10-25 Thread Andrew Zeneski
Hi All, I'm trying to determine if a use case is supported by Yokozuna or not. With a stored value that looks like: {"id": 1, "stats": { "name": "stat1", "value": 1 }, {"name": "stat2", "value": 5}} {"id": 2, "stats": { "name": "stat3", "value": 2 }, {"name": "stat1", "value": 3}} {"id": 3, "sta