You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by David Whalen <dw...@enr-corp.com> on 2007/09/10 16:59:18 UTC

quirks with sorting

Hi All.

I'm seeing a weird problem with sorting that I can't figure out.

I have a query that uses two fields -- a "source" column and a
date column.  I search on the source and I sort by the date
descending.

What I'm seeing is that depending on the value in the source,
the date sort works in reverse.

For example, the query:

content_source:(mv); content_date desc

returns 2007-09-10T09:25:00.000Z in its first row, which is what
I expect.

BUT, the query:

content_source:(thomson); content_date desc

returns 2008-08-17T00:00:00.000Z, which is the first date we
put into SOLR.

So, simply by changing the value in the field, the sort seems
to beem reversed (or ignored outright).

Now, before you ask, I did a "sanity-check" query to make sure
that there is in fact data for that source from today, and there
is.

Can anyone help shed some light on this?

TIA

DW

RE: quirks with sorting

Posted by David Whalen <dw...@enr-corp.com>.
<red-faced>

You know, I must have looked at that date 10 times and I never
noticed the year.

Sorry everyone!

</red-faced>

  

> -----Original Message-----
> From: yseeley@gmail.com [mailto:yseeley@gmail.com] On Behalf 
> Of Yonik Seeley
> Sent: Monday, September 10, 2007 11:23 AM
> To: solr-user@lucene.apache.org
> Subject: Re: quirks with sorting
> 
> On 9/10/07, David Whalen <dw...@enr-corp.com> wrote:
> > I'm seeing a weird problem with sorting that I can't figure out.
> >
> > I have a query that uses two fields -- a "source" column and a date 
> > column.  I search on the source and I sort by the date descending.
> >
> > What I'm seeing is that depending on the value in the 
> source, the date 
> > sort works in reverse.
> >
> > For example, the query:
> >
> > content_source:(mv); content_date desc
> >
> > returns 2007-09-10T09:25:00.000Z in its first row, which is what I 
> > expect.
> >
> > BUT, the query:
> >
> > content_source:(thomson); content_date desc
> >
> > returns 2008-08-17T00:00:00.000Z, which is the first date 
> we put into 
> > SOLR.
> 
> It is it the last (highest date) since it's 2008?
> 
> -Yonik
> 

Re: quirks with sorting

Posted by Yonik Seeley <yo...@apache.org>.
On 9/10/07, David Whalen <dw...@enr-corp.com> wrote:
> I'm seeing a weird problem with sorting that I can't figure out.
>
> I have a query that uses two fields -- a "source" column and a
> date column.  I search on the source and I sort by the date
> descending.
>
> What I'm seeing is that depending on the value in the source,
> the date sort works in reverse.
>
> For example, the query:
>
> content_source:(mv); content_date desc
>
> returns 2007-09-10T09:25:00.000Z in its first row, which is what
> I expect.
>
> BUT, the query:
>
> content_source:(thomson); content_date desc
>
> returns 2008-08-17T00:00:00.000Z, which is the first date we
> put into SOLR.

It is it the last (highest date) since it's 2008?

-Yonik