lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: solr server datetime
Date Fri, 27 Mar 2015 18:25:29 GMT
Why do you want to in the first place? I ask because it's a common
trap to think the server time is something that is useful...

That said, it would require a little fiddling, but you can return the
number of milliseconds since January 1, 1970 (standard Unix epoch) by
adding ms(NOW) to your fl parameter. The general case here is that you
can add the results of any function query to the fl list.

You could use a DocTransformer, here's a place to start:
https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents

There may be more elegant ways, but that one is easy.

Best,
Erick

On Thu, Mar 26, 2015 at 8:39 PM, fjq <fquintela@gmail.com> wrote:
> Is it possible to retrieve the server datetime?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/solr-server-datetime-tp4195728.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message