secondary indexes for timestamp

Norman Khine norman at
Thu Mar 1 04:56:52 EST 2012

Hello again,
I am trying to figure out how to return my search results from this
code, i am using the riak-js client:

				var time = +new Date();
				var origin;
				var results ='users', { timestamp:
[1330536456424,1330593323542] });
				response.writeHead(200, {
		                                   'Content-Type': 'image/gif'
				origin = /\/(.*)\.gif/.exec(request.url);
				if (origin) {
					var ip = ""
					//var ip = request.connection.remoteAddress;
					city = new City(__dirname + "/GeoLiteCity.dat");
					city.lookup(ip, function(err, location) {
							obj = {
	                                                      , latitude:
	                                                      , longitude:
	                                                      , ip: ip
							, timestamp: time
							self.bayeux.getClient().publish('/stat', obj);
							// write to riak cluster'users', 'norman', obj, { index: {timestamp: time} });
							console.log('was saved in the riak cluster');

the console.log(results);

returns 'undefined'

when i run the examples from the
i get this error:

<html><head><title>500 Internal Server
Error</title></head><body><h1>Internal Server Error</h1>The server
encountered an error while processing this
web server</ADDRESS></body></html>%

here is the full output

if i do

curl http://localhost:8098/solr/users/select?q=timestamp:1330593323542

<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">4</int>
<lst name="params">
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">timestamp:1330593323542</str>
<str name="q.op">or</str>
<str name="filter"/>
<str name="df">value</str>
<str name="wt">standard</str>
<str name="version">1.1</str>
<str name="rows">0</str>
<result name="response" numFound="0" start="0" maxScore="0.0"></result>

so i am not sure i am indexing the timestamp correctly.

any advice much appreciated

%>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or
chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )

More information about the riak-users mailing list