Re: Sort by date with Lucene 2.2.0 ...

2007-10-23 Thread Daniel Naber
On Tuesday 23 October 2007 15:57, Dragon Fly wrote: > I tried specifying the field type using a SortField object but I got the > same result.  I'll be glad to write a stand-alone test case.  Should I > post the code to this thread when I'm done or should I submit some sort > of bug report? Thanks.

RE: Sort by date with Lucene 2.2.0 ...

2007-10-23 Thread Dragon Fly
t; To: [email protected] > Subject: Re: Sort by date with Lucene 2.2.0 ... > Date: Fri, 19 Oct 2007 19:50:46 +0200 > > On Thursday 18 October 2007 21:35, Dragon Fly wrote: > > > I'm am trying to sort a date field in my index but I'm seeing strange > > resul

Re: Sort by date with Lucene 2.2.0 ...

2007-10-19 Thread Daniel Naber
On Thursday 18 October 2007 21:35, Dragon Fly wrote: > I'm am trying to sort a date field in my index but I'm seeing strange > results.  I have searched the Lucene user mail archive for Datetools but > still couldn't figure out the problem. It shouldn't make a difference but does it help if you s

RE: Sort by date with Lucene 2.2.0 ...

2007-10-19 Thread Dragon Fly
[EMAIL PROTECTED] > To: [email protected] > Subject: Re: Sort by date with Lucene 2.2.0 ... > > Maybe I'm missing something, but that looks like the correct > order to me, they are both on September 02, 2007, 11:30 P.M, and > ]24 seconds is before 48 seconds. &g

Re: Sort by date with Lucene 2.2.0 ...

2007-10-18 Thread Erick Erickson
Maybe I'm missing something, but that looks like the correct order to me, they are both on September 02, 2007, 11:30 P.M, and ]24 seconds is before 48 seconds. Or is it just late and I'm missing the obvious (a specialty of mine)... Erick On 10/18/07, Dragon Fly <[EMAIL PROTECTED]> wrote: > >

Re: Sort by date THEN by relevancy

2006-09-30 Thread KEGan
Erick, Wow!! Thanks for the invaluable advice and sharing of your experience :) I greatly appreciate them. Alright, I think it really make the most sense to follow the path of least resistant first, then see if it really need optimization. Thanks a lot. ~KEGan On 9/30/06, Erick Erickson <[EM

Re: Sort by date THEN by relevancy

2006-09-30 Thread Erick Erickson
See below On 9/29/06, KEGan <[EMAIL PROTECTED]> wrote: Erick, Thanks for the great advice!! About closing/opening searcher on each request isnt this unavoidable in some cases? The application I am building will have users insert/search documents all the time. So for every insert, the sea

Re: Sort by date THEN by relevancy

2006-09-29 Thread KEGan
Erick, Thanks for the great advice!! About closing/opening searcher on each request isnt this unavoidable in some cases? The application I am building will have users insert/search documents all the time. So for every insert, the searcher need to be recreated again, isnt it? Else new docume

Re: Sort by date THEN by relevancy

2006-09-29 Thread Erick Erickson
Sorting will inevitably have an impact on your speed, but it's impossible to generalize. FWIW, my app has 870K documents, the index is around 1.4G and search/sort times are fine. But even that statement is misleading. "Fine" means that the product manager for this product is satisfied with perform

Re: Sort by date THEN by relevancy

2006-09-29 Thread KEGan
Erick, Ouch!! Please excuse the cut-n-paste ;) LIA mentions a lot about performance when doing sorting. Is it something to be cautious about? You mention doing 5 fields and it works ok, ... can share with us how many documents you are handling there with 5 fields ? Thanks. ~KEGan On 9/29/06,

Re: Sort by date THEN by relevancy

2006-09-29 Thread Erick Erickson
Yes. I do this with 5 fields and it works just fine. Although your cut-n-paste got kind of hard to read Erick On 9/29/06, KEGan <[EMAIL PROTECTED]> wrote: I think I am going to answer my own question. Just use the *Sort*< file:///D:/library/apache/lucene-2.0.0/docs/api/org/apache/lucene

Re: Sort by date THEN by relevancy

2006-09-29 Thread KEGan
I think I am going to answer my own question. Just use the *Sort* (SortField [] fields) *Sort* (String [] fields) This should do it right ? On 9/29/06, KEGan <[EMAIL PROTECTED]> wrote: Hi, I have seen some sort examples in LIA.

Re: Sort by Date

2006-08-29 Thread Erik Hatcher
On Aug 29, 2006, at 3:54 PM, Mag Gam wrote: "Index the date". Do you mean, index date, or the document date? Could this be in a LIA book? This is entirely up to you. What gets indexed is entirely within the developers control. What date do you want indexed? I presume by "document date

Re: Sort by Date

2006-08-29 Thread Chris Hostetter
: mmdd so that it can be sorted. having done that, however, I am : unsure how to ask Lucene to sort on that date, but I'll figure it out : in time or someone will tell me. you don't need to wait ... it's already been explained in this thread, look at the Sort class and the methods in IdexSea

Re: Sort by Date

2006-08-29 Thread Bill Taylor
i gave each of my documents a special field named date and I put in a normalized Lucene date with a precision of one day. This date is mmdd so that it can be sorted. having done that, however, I am unsure how to ask Lucene to sort on that date, but I'll figure it out in time or someone wi

Re: Sort by Date

2006-08-29 Thread Mag Gam
"Index the date". Do you mean, index date, or the document date? Could this be in a LIA book? On 8/29/06, Erik Hatcher <[EMAIL PROTECTED]> wrote: On Aug 29, 2006, at 11:50 AM, Mag Gam wrote: > Is it possible to sort results by date of the document? Sure, check out the Sort class and the ov

Re: Sort by Date

2006-08-29 Thread Erik Hatcher
On Aug 29, 2006, at 11:50 AM, Mag Gam wrote: Is it possible to sort results by date of the document? Sure, check out the Sort class and the overloaded IndexSearcher.search () methods that take a Sort. You will need to index the date in a sortable way. DateTools provides handy methods for t