Riak solr query range issue

tele tele at rhizomatica.org
Mon Aug 11 03:18:29 EDT 2014


Hi,

Never mind i've got it working with riak2.0 and the new riak search.
did my schema, indexed some data and now i can query for the range:

curl
'http://localhost:8098/search/query/users_index?wt=json&q=age:%7B12%20TO%2040%7D'
2>/dev/null | jsonpp

Thanks

:tele



On Sun, 10 Aug 2014 18:25:16 -0500
tele <tele at rhizomatica.org> wrote:

> Hi,
> 
> I have a simple solr document like this:
> 
> <?xml version="1.0" ?>
> <add>
> 	<doc>
> 		<field name="city">Oslo</field>
> 		<field name="name">Bob</field>
> 		<field name="age_int">34</field>
> 	</doc>
> </add>
> 
> As "id" i use an email addr added to a 'users' index. 
> I've defined age as Int field.
> 
> I can now query the index with:
> 
> # search-cmd search users "name:Bob"
>  :: Searching for 'name:Bob' / '' in users...
> ------------------------------
> index/id: users/foo at bar.org
> p -> [0]
> score -> 0.35355339059327373
> ------------------------------
>  :: Found 1 results.
> 
> If i do search-cmd search users "age:34" 
> It works. 
> 
> If i try the range 
> 
> search-cmd search users "age:[20 TO 40]"
> 
> It just gives me the Usage of "search-cmd" again without saying
> anything like if the syntax is wrong.
> 
> Uing the HTTP solr interface basically is the same i get no results..
> 
> curl "http://localhost:8098/solr/users/select?q=age:%7B20 TO 50%7D"
> curl: (52) Empty reply from server
> 
> curl 'http://localhost:8098/solr/users/select?q=age:{20 TO 50}'
> curl: (52) Empty reply from server
> 
> What i am doing wrong? please note i have other data in the index
> 
> My riak version is 1.4.10
> 
> Thanks
> 
> :tele
> 
> _______________________________________________
> 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