>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.
>View this message in context:
>Sent from the Solr - User mailing list archive at Nabble.com.
Here is an example DIH entity that will delete from solr anything in the database that is not flagged as 'active'.
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' "
Thanks for answering Param, I appreciate it. I am actually looking for a way to delete records when performing a full import to the index. I am able to do it when issuing a delta import command by using the deletedPkQuery, but unfortnately the poor performance of the delta import prohibits me from doing so. So I am using the full import command with clean=false to run a more efficient delta import, but can't figure out how to perform a delete during this operation. Thanks for your time though, I really appreciate it.
On Wed, 2012-02-01 at 16:54 +0000, Sethi, Parampreet wrote:
> Hi Erik,
> Is this what you are looking for?
> http://lucene.apache.org/solr/tutorial.html#Deleting+Data >
> Execute the following command to delete a document
> java -Ddata=args -Dcommit=no -jar post.jar
> Here is an example of using delete-by-query to delete anything with
> DDR <http://localhost:8983/solr/select?q=name:DDR&fl=name> in the
> java -Ddata=args -jar post.jar "<delete><query>name:DDR</query></delete>"
> In case you are using Solrj client or similar there are direct functions
> available to modify the index (add/update/delete).
> Hope it helps!
> On 2/1/12 11:14 AM, "ejcirel" <[hidden email]> wrote:
> >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.
> >View this message in context:
> >http://lucene.472066.n3.nabble.com/deleteDocByQuery-and-deleteDocByID-tp37 > >07070p3707070.html
> >Sent from the Solr - User mailing list archive at Nabble.com.
PALS, A Program of the Minnesota State Colleges and Universities
[hidden email] "It's hard to lead a cavalry charge if you think you look funny on a
horse" ~ Adlai Stevenson
> Hi Erik,
> I am also looking for some example of deleteDocByQuery. Here is my
> requirement -
> I want to do the database query and get the list of values of which
> documents should be deleted from Solr.
> I want to delete the docs which matches following query
> This <value> will come from query executed on RDBMS -
> select columnName from Table where state = 'deleted'
> This columnName is the value populated in Solr for SolrColulmnName.
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html >