You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by stockii <st...@shopgate.com> on 2010/05/31 17:59:23 UTC
deleteDocByID
Hello.
i have a littel porblem to synchronize my index with my database.
we have an extra table for delta-import. we cannot use a modified-field =(
so. in this delta-table where all id saved to update. after a deltaimport
this table should be deleted. this works fine.
but when an item is is deleted i save this in my delta-table with a flag
"is_deleted"
how can i add the row $deleteDocByID" ? i use an script for docBoosting and
i thought to solve this problem on the same way. but it dont wont to work =(
this is my script:
function DeleteDoc(row){
var is_deleted = row.get('is_deleted');
var id = row.get('update_id');
if(is_deleted == true){
row.put('$deleteDocById', 'id');
}
}
<entity name="delete" transformer="script:DeleteDoc" query="SELECT update_id
FROM solr_imports WHERE is_deleted=true" />
can i use this script in my normal delta-import ? or should i create a new
entity ?
whats your solutions ? what do yu thing is the smartest way to delete these
docs from the index ?
thx =) =) =)
--
View this message in context: http://lucene.472066.n3.nabble.com/deleteDocByID-tp858903p858903.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: deleteDocByID
Posted by stockii <st...@shopgate.com>.
oh sry, i solve it with this entity:
<entity name="delete" pk="id" deletedPkQuery="SELECT update_id as id FROM
solr_imports WHERE is_deleted=true" />
;) thx nabble
--
View this message in context: http://lucene.472066.n3.nabble.com/deleteDocByID-tp858903p858951.html
Sent from the Solr - User mailing list archive at Nabble.com.