lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Richmond" <richmondm...@gmail.com>
Subject Re: sorting issues
Date Fri, 26 May 2006 15:46:34 GMT
I'm running into similar sort issues when I try to sort my results on
a date field that was created using the DateTools class as follows:

DateTools.dateToString(dateObj, DateTools.Resolution.SECOND);

I am then storing this in a stored, untokenized field named "date".
When I sort the results by date, I am not getting them in date order.

Ex (dates converted back to a more readable format):

05/26/06 at 08:03:34 AM
05/25/06 at 01:36:57 PM
05/26/06 at 06:58:09 AM

Do I need to have a tokenized date field to get the results that I am expecting?


Thanks,

Mike



On 5/23/06, Van Nguyen <vnguyen@wynnesystems.com> wrote:
> I was expecting it to be sorted alphabetically by a field....
>
> I think I may have figured out my own question.  I was tokenizing the
> field I wanted to sort.  Changed it so that it's not tokenizing that
> field and I'm getting the results that I was expecting.
>
> Thanks,
>
> Van Nguyen
> Wynne Systems, Inc.
>
> -----Original Message-----
> From: karl wettin [mailto:kalle@snigel.net]
> Sent: Tuesday, May 23, 2006 3:42 PM
> To: java-user@lucene.apache.org
> Subject: Re: sorting issues
>
> On Tue, 2006-05-23 at 15:42 -0700, Van Nguyen wrote:
> >
> > Does anyone have any sorting issues in lucene?  When lucene is
> > returning results from my query, I get results similar to this:
> >
> > E.D. BULLARD
> > E.D. BULLARD
> > MINE SAFETY APPL MSA
> > NORTH SAFETY PRODUCT
> > NORTH SAFETY PRODUCT
> > MINE SAFETY APPL MSA
> > MINE SAFETY APPL MSA
> > NORTH SAFETY PRODUCT
>
> What did you expect, and why?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> This communication and any documents, files, or previous electronic mail messages attached
to it constitute
> an electronic communication within the scope of the Electronic Communication Privacy
Act, 18 USCA 2510.
> This communication may contain non-public, confidential, or legally privileged information
intended for the
> sole use of the designated recipient(s). The unlawful interception, use or disclosure
of such information is
> strictly prohibited under 18 USCA 2511 and any applicable laws.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message