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.

Sort by date THEN by relevancy

2006-09-29 Thread KEGan
Hi, I have seen some sort examples in LIA. But cant find what I am looking for. How do I sort document by date, AND for all the documents with the same date ... these are sorted by relavency. (Date has higher sort priority in this case). Thanks.