Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 68608 invoked from network); 31 Oct 2003 10:18:43 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 31 Oct 2003 10:18:43 -0000 Received: (qmail 48426 invoked by uid 500); 31 Oct 2003 10:18:12 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 48395 invoked by uid 500); 31 Oct 2003 10:18:12 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 48382 invoked from network); 31 Oct 2003 10:18:11 -0000 Received: from unknown (HELO c000.snv.cp.net) (209.228.32.64) by daedalus.apache.org with SMTP; 31 Oct 2003 10:18:11 -0000 Received: (cpmta 16229 invoked from network); 31 Oct 2003 02:18:24 -0800 Received: from 24.51.109.181 (HELO ehatchersolutions.com) by smtp.hatcher.net (209.228.32.64) with SMTP; 31 Oct 2003 02:18:24 -0800 X-Sent: 31 Oct 2003 10:18:24 GMT Date: Fri, 31 Oct 2003 05:18:31 -0500 Subject: Re: Remove a token from a field Content-Type: text/plain; delsp=yes; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Erik Hatcher To: "Lucene Users List" Content-Transfer-Encoding: 7bit In-Reply-To: <3FA222ED.8020707@imente.com> Message-Id: <93BEB0DC-0B8B-11D8-BCDC-000393A564E6@ehatchersolutions.com> X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Friday, October 31, 2003, at 03:53 AM, Albert Vila Puig wrote: > Hi, > > Is there a way to remove a token from a document field entry?. For > example, I've got a UnStored field in my index and I want to remove a > token from this field without doing the delete and add document > (because I'm inserting the documents by date and I don't want to loose > that sort). > > Is there an easy way to do that? Has anybody already started > implementing it? Any suggestions about if I can do it in an efficient > way? Maybe with another deletable file by fields? Presently there is no way to "update" a document without doing a delete/add. The sorting issue is an interesting one. By design, of course, Lucene is meant to sort by score - period. There has been an interesting implementation of a custom searcher posted about this topic in the recent past: http://cvs.sourceforge.net/viewcvs.py/weblucene/weblucene/webapp/WEB- INF/src/org/apache/lucene/search/ IndexOrderSearcher.java?rev=1.2&view=auto It would be a performance hit to access the contents of a document during searching to pull the contents of a field though, but that search method shown could be adapted to do so and sort by a particular field during searching. I tend to suggest that date sorting is something that should be done on a data set culled from hits after searching is complete rather than during the searching operation itself. There are games that could be played with boosts and perhaps a custom Similarity implementation that might be able to pull off date sorting somehow too - I'll add this to my list of interesting things to try out for fun. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org