sorting issues

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

sorting issues

slow4runner
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
...
 
Van
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.
Reply | Threaded
Open this post in threaded view
|

Re: sorting issues

Karl Wettin-3
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: sorting issues

slow4runner
In reply to this post by slow4runner
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:[hidden email]]
Sent: Tuesday, May 23, 2006 3:42 PM
To: [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]


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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: sorting issues

OneWhoMikes
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 <[hidden email]> 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:[hidden email]]
> Sent: Tuesday, May 23, 2006 3:42 PM
> To: [hidden email]
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: sorting issues

Daniel Naber-5
On Freitag 26 Mai 2006 17:46, Mike Richmond wrote:

> I am then storing this in a stored, untokenized field named "date".

From the API docs:

The field must be indexed, but should not be tokenized, and does not need
to be stored (unless you happen to want it back with the rest of your
document data). In other words:
document.add (new Field ("byNumber", Integer.toString(x), Field.Store.NO,
Field.Index.UN_TOKENIZED));

--
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]