I have a cfsearch that is displaying a record that was deleted from the database weeks ago. I have run the code below and the record keeps coming up. What am I doing wrong? Here's the code:
<cfquery name="getstudents" datasource="myDatasource">
SELECT ID, fname, lname, fullName
body="fname, lname, fullName">
maxrows = "100">
cfdump of getstudents returns the records with one instance of smith
cfdump of getstudents2 returns the records with two instances of smith - one of which has been deleted from the database
I have exactly the same issue. It's like it has the old data cached. I've even deleted the collection in the CF Admin and rebuilt it.
I normally rename the collection and rebuild it but I just found in the CF Admin that you can Purge the collection. That seems like it would fix the issue too.
Analyzes the files in a collection and assembles metadata and pointers to the files.
Reclaims space left by deleted and changed files by consolidating collection indexes for faster searching. You should optimize collections regularly.
Deletes all documents in a collection, but not the collection itself. Leaves the collection directory structure intact.
Deletes a collection