Here is an example DIH entity that will delete from solr anything in the 
database that is not flagged as 'active'.

<entity
         name="Deletes"
         dataSource="ds"
         query="
                SELECT a.id AS '$deleteDocById'
                FROM products a
                INNER JOIN status_master sm on a.status_master_id = 
sm.status_master_id
                WHERE sm.status_master_value != 'Active' "
/>

There also was a bug, fixed in version 3.4, that would not commit automatically 
if only Deletes were processed in a DIH run.  See 
https://issues.apache.org/jira/browse/SOLR-2492 .

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: ejcirel [mailto:ejci...@yahoo.com] 
Sent: Wednesday, February 01, 2012 10:15 AM
To: solr-user@lucene.apache.org
Subject: $deleteDocByQuery and $deleteDocByID

Does anyone have an example of how to use the $deleteDocByQuery and
$deleteDocByID special commands.  I am not finding much online.  Any help
would be greatly appreciated.  Thank you.

Erik

--
View this message in context: 
http://lucene.472066.n3.nabble.com/deleteDocByQuery-and-deleteDocByID-tp3707070p3707070.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to