lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis.gospodne...@gmail.com>
Subject Re: retrieving latest document **only**
Date Thu, 10 Jan 2013 15:11:41 GMT
Hi,

Just add the required query clause with the appropriate range on that
timestamp field you have to your existing query.

Otis
Solr & ElasticSearch Support
http://sematext.com/
On Jan 10, 2013 5:55 AM, "jmozah" <jmozah@gmail.com> wrote:

>
> I need a query that matches only the most recent ones...
> Because my stats depend on it..
>
>
>
> ./Zahoor
> HBase Musings
>
>
> On 10-Jan-2013, at 3:37 PM, Naresh <nnaresh@gmail.com> wrote:
>
> > Hi,
> > Can you sort on the timestamp field (descending) and take only the top
> most
> > row (rows=1)?
> >
> > Or are you saying that you want a query such that it matches only the
> most
> > recent one?
> >
> > On Thu, Jan 10, 2013 at 5:27 PM, jmozah <jmozah@gmail.com> wrote:
> >
> >>
> >> HI
> >>
> >> I use solr 4.0 and have documents which have a timestamp field.
> >>
> >> For a given query i know how to boost the latest documents and show them
> >> up first.
> >>
> >> But I have a requirement to show **only** the latest documents and the
> >> "stats" along with it..
> >>
> >> If i use boosting..the older documents still make it to the query and
> >> therefore contribute to the stats...
> >>
> >> Can anyone tell me how to get **only** the latest dated document?
> >>
> >> PS: the latest date can be Today, yesterday.. anything int eh past.. so
> >> date based range filter would not help here..
> >>
> >> ./zahoor
> >>
> >>
> >
> >
> > --
> > Regards
> > Naresh
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message