Change your schema.erl for that bucket to index those date fields as strings. I 
believe it's the "noop" tokenizer. 


@siculars
http://siculars.posterous.com

Sent from my iRotaryPhone

On Dec 28, 2012, at 9:35, Daniel Gerep <[email protected]> wrote:

> Hi all,
> 
> I'm saving logs like this:
> 
> {
> "transaction_type": "company",
> "app_name": "app.posxml",
> "started_at": "2012/12/28 12:23:19",
> "finished_at": "2012/12/28 12:23:26",
> "serial_number": "941-823-764",
> "terminal_id": "474",
> "framework_version": "3.53",
> "status": "timeout",
> "sent": "3130504220202008000000010926155750100334380D",
> "received": "5676182745146776819287501928735143928376891D"
> }
> 
> I have created a schema for this bucket defining the started_at and 
> finished_at as date.
> 
> This is the result from a search, just to make sure the two fields are date:
> 
> <doc>
> 
> <str name="id">20121228121940-MjAxMjEyMjgxMjE5NDA=117233</str>
> <str name="app_name">app.posxml</str>
> <date name="finished_at">2012/12/28 12:19:40</date>
> <int name="framework_version">3.50</int>
> <str name="received">5676182745146776819287501928735143928376891D</str>
> <str name="sent">3130504220202008000000010926155750100334380D</str>
> <str name="serial_number">158-271-426</str>
> <date name="started_at">2012/12/28 12:19:33</date>
> <str name="status">running</str>
> <int name="terminal_id">715</int>
> <str name="transaction_type">switch</str>
> </doc>
> 
> I made a test changing the date, removing the "/" and ":", it works perfectly 
> using riak_search.
> 
> http://localhost:8098/solr/dg1_logs/select?q=started_at:[20121228122319 TO 
> 20121228200000]
> 
> The thing is that I cannot change the way that the dates are saved, they must 
> have this format.
> 
> I'm trying to make this work:
> 
> http://localhost:8098/solr/dg1_logs/select?q=started_at:[2012/12/28 12:23:19 
> TO 2012/12/28 20:00:00]
> 
> Is it possible?
> 
> Thanks in advance
> 
> -- 
> 
> Att
> Daniel Gerep
> 
> Live long and prosper
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to