You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2011/07/13 11:38:59 UTC

[jira] [Commented] (SOLR-2104) DIH special command $deleteDocById dosn't skip the document and doesn't increment the deleted statistics

    [ https://issues.apache.org/jira/browse/SOLR-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064456#comment-13064456 ] 

Shalin Shekhar Mangar commented on SOLR-2104:
---------------------------------------------

For #1: The $deleteDocById is meant for deleting docs which are already in the index. The current row/doc is not committed to the index yet and therefore it is not affected by this flag. Hence the need to return both the flags for your use-case.

Bug #2: This fix will be available in v3.4 and v4.0. Unfortunately, we cannot give the right statistics but at least a commit will be called.

> DIH special command $deleteDocById dosn't skip the document and doesn't increment the deleted statistics
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2104
>                 URL: https://issues.apache.org/jira/browse/SOLR-2104
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4, 1.4.1
>            Reporter: Ephraim Ofir
>            Priority: Minor
>
> 1. Not sure it's a bug, but looks like a bug to me - if the query returns any values other than $deleteDocById for the row you want deleted, it deletes the row but also re-adds it with the rest of the data, so in effect the row isn't deleted.  In order to work around this issue, you have to either make sure no data other than $deleteDocById=<id> exists in rows to be deleted or add $skipDoc='true'
> (which I think is a little counter-intuitive, but was the better choice in my case).  My query looks something like:
> SELECT u.id,
>        u.name,
>        ...
>        IF(u.delete_flag > 0, u.id, NULL) AS $deleteDocById,
>        IF(u.delete_flag > 0, 'true', NULL) AS $skipDoc FROM users_tb u
> 2. $deleteDocById doesn't update the statistics of deleted documents.
> This has 2 downsides, the obvious one is that you don't know if/how many documents were deleted, the not-so-obvious one is that if your import contains only deleted items, it won't be committed automatically by DIH and you'll have to commit it manually.

--
This message is automatically generated by JIRA.
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