Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8EF099D9A for ; Mon, 27 Feb 2012 17:05:15 +0000 (UTC) Received: (qmail 72938 invoked by uid 500); 27 Feb 2012 17:05:14 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 72883 invoked by uid 500); 27 Feb 2012 17:05:14 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 72876 invoked by uid 99); 27 Feb 2012 17:05:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2012 17:05:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Feb 2012 17:05:11 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BC5FB33C6C7 for ; Mon, 27 Feb 2012 17:04:49 +0000 (UTC) Date: Mon, 27 Feb 2012 17:04:49 +0000 (UTC) From: "Uwe Schindler (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <1996864677.23468.1330362289772.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1169829665.23230.1330359529176.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3828) Impossible to delete doc by docId, undeleteAll or setNorm(docId..) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217296#comment-13217296 ] Uwe Schindler commented on LUCENE-3828: --------------------------------------- Hi Andrzej, - I agree with point (1), because it might be handy to delete documents by internal docId. I am not sure why this would not be possible through IndexWriter, but the problem here is the background-merging/merging at all, so with TieredMergePolicy even with a open IndexWriter the docIds can change suddenly. The only way to get stable docIds would be some mode to freeze IndexWriter's merging, get an NRT reader, delete documents using the integer ID on IndexWriter, then unfreeze and commit. IndexReader should of course stay read-only. - The undeleteAll is in my opinion no longer really needed in trunk, as you can undelete all docs in Lucene 4.0 by simply ignoring liveDocs when executing Querys (e.g. by a FilterAtomicReader that returns null for getLiveDocs()). If we want to readd something like that, it should be on IndexWriter, I think that should be easily possible to undelete from IndexWriter. IndexReader should of course stay read-only. - The last point is already explained in the other issues related to that: Norms are in 4.0 just DocValues so once we get updateable DocValues we could handle that (of course not via IndexReader). In all cases you can change scoring by changing similarity which is much more flexible in trunk, you can even use a custom docvalues field as norm containing a float instead of the byte. Changing norm values on disk is not really the way to go anymore. And finally again: IndexReader should of course stay read-only. > Impossible to delete doc by docId, undeleteAll or setNorm(docId..) > ------------------------------------------------------------------ > > Key: LUCENE-3828 > URL: https://issues.apache.org/jira/browse/LUCENE-3828 > Project: Lucene - Java > Issue Type: Bug > Components: core/index > Affects Versions: 4.0 > Reporter: Andrzej Bialecki > > It appears that there is a major regression in the trunk API. It's no longer possible to: > 1. delete document by internal id (even though you can iterate and retrieve docs by internal ids) > 2. undelete all deleted (but not yet reclaimed) documents > 3. set norm value on a specific document (by internal id) > The lack of #1 means that you have to use delete by term or by query, which in turn means that now we require that documents have a unique primary key (otherwise you won't be able to delete a particular document that shares terms with other docs). IMHO this item is critical and should be fixed. > The lack of #2 might not be critical but it still comes handy in some situations. > The lack of #3 means that you have to update the whole doc if you just want to correct one field, which might be ok for the time being - it's a special case of not having updateable fields in general. But it's quite inconvenient if all you want to do is to adjust a weight of doc without reindexing, something that is possible with 3.x. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org