lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "none none" <kor...@lycos.com>
Subject Re: AW: Better way to Sort by Date
Date Sun, 12 Oct 2003 07:30:23 GMT
Hi,
i don't have a DB as source, my documents are on the FileSystem, also, what you are saying
means i have to rebuild the index everytime i add a document? i think the idea of write a
sorted index is kind hard, also what if i have 2 dates and filesize as well? i am looking
for a more standard way to that. 
thanks

--

--------- Original Message ---------

DATE: Fri, 10 Oct 2003 16:47:34
From: "Karsten Konrad" <Karsten.Konrad@xtramind.com>
To: "Lucene Developers List" <lucene-dev@jakarta.apache.org>,<korfut@lycos.com>
Cc: 

>
>Hello,
>
>>>
>ok, good idea, but how can i do that?
>>>
>
>that really depends on where you get your documents from.
>Sorry, as this is quite an unspecific problem, I can not
>give specific code.
>
>If, for instance, the documents come from a database, you could 
>use the SQL-Query to compute an ordered list of document 
>id's sorted by date - then you can create a new index and 
>insert each document one by one by the order given by the list.
>
>In general, if no such external sorting mechanism exists, I would 
>make a Java sorter class that holds some link to the document (such as 
>its filename or URL or whatever) and its date (from wherever you have 
>that info). Make sure that the class implements Comparable and write
>the  compareTo-method such that it compares the dates appropriately. 
>Then for each document you have, create a sorter object and put it 
>into a TreeSet. After you have added all sorter objects, you have a 
>sorted collection of the documents and can insert them in order into a 
>Lucene index.
>
>Clear?
>
>Karsten
>
>
>
>-----Urspr&#252;ngliche Nachricht-----
>Von: none none [mailto:korfut@lycos.com] 
>Gesendet: Freitag, 10. Oktober 2003 16:21
>An: Lucene Developers List
>Betreff: Re: Better way to Sort by Date
>
>
>ok, good idea, but how can i do that?
>any examples? 
>thank you,
>
>--
>
>--------- Original Message ---------
>
>DATE: Fri, 10 Oct 2003 09:18:33
>From: "Karsten Konrad" <Karsten.Konrad@xtramind.com>
>To: "Lucene Developers List" <lucene-dev@jakarta.apache.org>,<korfut@lycos.com>
>Cc: 
>
>>
>>Hi,
>>
>>the fastest way would be to build your index such that the documents 
>>are inserted in the order of their date. You can then sort a search 
>>result very quickly by date by sorting the document numbers in the 
>>result.
>>
>>Regards,
>>
>>Mit freundlichen Gr&#252;&#223;en aus Saarbr&#252;cken
>>
>>--
>>
>>Dr.-Ing. Karsten Konrad
>>Head of Artificial Intelligence Lab
>>
>>XtraMind Technologies GmbH
>>Stuhlsatzenhausweg 3
>>D-66123 Saarbr&#252;cken
>>Phone: +49 (681) 3025113
>>Fax: +49 (681) 3025109
>>konrad@xtramind.com
>>www.xtramind.com
>>
>>Besuchen Sie uns auf der SYSTEMS!
>>20.-24. Oktober 2003, Neue Messe M&#252;nchen
>>Halle A1, Stand 518
>>
>>
>>
>>
>>-----Urspr&#252;ngliche Nachricht-----
>>Von: none none [mailto:korfut@lycos.com]
>>Gesendet: Freitag, 10. Oktober 2003 06:50
>>An: lucene-dev@jakarta.apache.org
>>Betreff: Better way to Sort by Date
>>
>>
>>hi all,
>>what is the fastest way to sort results by date?
>>anybody implemented it yet? any good performance?
>>
>>thank you,
>>Korfut.
>>
>>
>>
>>____________________________________________________________
>>Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! 
>>http://login.mail.lycos.com/r/referral?aid=27005
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>>
>>
>
>
>
>____________________________________________________________
>Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! http://login.mail.lycos.com/r/referral?aid=27005
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>
>



____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

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


Mime
View raw message