I have a site where users can place advertisements. My DB is MSSQL2008.

This is my sql statement when a user deletes an ad (you see its not
completely deleted, but rather its updated): 
UPDATE ads SET deletedate = GETDATE(), deletereason = @deletereason,
updatedate = GETDATE() WHERE (id = @id)

here's my data-config which handles the delta import:

<entity pk="id" name="ad" 
query="select * from ads WHERE approvedate &gt; '1/1/1900' and publishdate
&lt; getdate() AND depublishdate &gt; getdate() and deletedate = '1/1/1900'"
deltaImportQuery="select * from ads WHERE approvedate &gt; '1/1/1900' and
publishdate &lt; getdate() AND depublishdate &gt; getdate() and deletedate =
'1/1/1900' and id='${dataimporter.delta.id}'"
deltaQuery="select id from ads where updatedate &gt;
'${dataimporter.last_index_time}' ">    


Now, why, after I delete an ad, does it still show in my search results?
What line am I missing in my SQL in my data-config?

--
View this message in context: 
http://lucene.472066.n3.nabble.com/delta-import-with-soft-delete-sql-tp3195798p3195798.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to