why don't we have a forum for discussion?

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Retrieve last indexed documents...

Pierre-Yves LANDRON

Hello everybody,

I suppose this is a very common question, and I'm sorry if it has been answered before : How can I retrieve the last indexed documents (I use a timestamp field defined as <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>) ?

Thanks,
Pierre Landron

_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/products/events.aspx
Reply | Threaded
Open this post in threaded view
|

Re: Retrieve last indexed documents...

Otis Gospodnetic-2

Pierre,

This is the issue to watch: https://issues.apache.org/jira/browse/SOLR-1023

I don't think there is a super nice way to do that currently.  You could use the match-all query (*:*) and sort by timestamp desc, and use start=0&rows=1.  Using a raw timestamp that includes milliseconds is not recommended unless you really need milliseconds.


Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch



----- Original Message ----

> From: Pierre-Yves LANDRON <[hidden email]>
> To: [hidden email]
> Sent: Friday, February 20, 2009 8:04:28 PM
> Subject: Retrieve last indexed documents...
>
>
> Hello everybody,
>
> I suppose this is a very common question, and I'm sorry if it has been answered
> before : How can I retrieve the last indexed documents (I use a timestamp field
> defined as
> default="NOW" multiValued="false"/>) ?
>
> Thanks,
> Pierre Landron
>
> _________________________________________________________________
> Show them the way! Add maps and directions to your party invites.
> http://www.microsoft.com/windows/windowslive/products/events.aspx

Reply | Threaded
Open this post in threaded view
|

RE: Retrieve last indexed documents...

Pierre-Yves LANDRON

OK, thanks,

That's what i've done ; I've kind of hoped that there was a nicer way to go, but after all, it works that way anyway...

Cheers,
P Landron

> Date: Fri, 20 Feb 2009 06:05:24 -0800
> From: [hidden email]
> Subject: Re: Retrieve last indexed documents...
> To: [hidden email]
>
>
> Pierre,
>
> This is the issue to watch: https://issues.apache.org/jira/browse/SOLR-1023
>
> I don't think there is a super nice way to do that currently.  You could use the match-all query (*:*) and sort by timestamp desc, and use start=0&rows=1.  Using a raw timestamp that includes milliseconds is not recommended unless you really need milliseconds.
>
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
> > From: Pierre-Yves LANDRON <[hidden email]>
> > To: [hidden email]
> > Sent: Friday, February 20, 2009 8:04:28 PM
> > Subject: Retrieve last indexed documents...
> >
> >
> > Hello everybody,
> >
> > I suppose this is a very common question, and I'm sorry if it has been answered
> > before : How can I retrieve the last indexed documents (I use a timestamp field
> > defined as
> > default="NOW" multiValued="false"/>) ?
> >
> > Thanks,
> > Pierre Landron
> >
> > _________________________________________________________________
> > Show them the way! Add maps and directions to your party invites.
> > http://www.microsoft.com/windows/windowslive/products/events.aspx
>

_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
12