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: java-user@lucene.apache.org > 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: java-user@lucene.apache.org > 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: > >

Sort by date with Lucene 2.2.0 ...

2007-10-18 Thread Dragon Fly
Hi, 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. The date field is indexed as follows (i.e. DateTools is used, date field is stored and untokenized): Strin

RE: Avoiding sort by date

2006-10-16 Thread Graham Stead
006 8:32 PM > To: java-user@lucene.apache.org > Subject: Re: Avoiding sort by date > > On 10/12/06, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > Does the Sort function create some kind of internal cache? > > Yes, it's called the FieldCache, and there is a cache w

Re: Avoiding sort by date

2006-10-15 Thread Yonik Seeley
On 10/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Does the Sort function create some kind of internal cache? Yes, it's called the FieldCache, and there is a cache with a weak reference to the index reader as a key. As long as there is a reference to the index reader (even after close()

Re: Avoiding sort by date

2006-10-13 Thread Erik Hatcher
:58:50 PM Subject: Re: Avoiding sort by date You really should be using the same IndexSearcher for successive searches. Sorting works best when done with a "warm" searcher. Have a look at Solr's warming strategy, and consider adopting that in some way. Erik On Oct 12, 200

Re: Avoiding sort by date

2006-10-12 Thread rayvittal-lists
ED]> To: java-user@lucene.apache.org Sent: Thursday, October 12, 2006 12:58:50 PM Subject: Re: Avoiding sort by date You really should be using the same IndexSearcher for successive searches. Sorting works best when done with a "warm" searcher. Have a look at Solr's warming strategy

Re: Avoiding sort by date

2006-10-12 Thread Erik Hatcher
You really should be using the same IndexSearcher for successive searches. Sorting works best when done with a "warm" searcher. Have a look at Solr's warming strategy, and consider adopting that in some way. Erik On Oct 12, 2006, at 3:04 PM, <[EMAIL PROTECTED]> wrote: Hi folks

Avoiding sort by date

2006-10-12 Thread rayvittal-lists
Hi folks, I am using Lucene 2.0 In our application, I am indexing a stream of documents. Each document is fairly small (< 1 KB), but there can be 10's of millions of documents. Each document has a Timestamp field. Users can enter free-form searches and a date/time range. They are most interest

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.

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

Sort by Date

2006-08-29 Thread Mag Gam
Is it possible to sort results by date of the document?