knb website query result shows old version of a document
Oliver Soong wrote:
I dropped a note about this on IRC, and Matt suggested you two might
be the ones to hear about it. ï¿½If I search on KNB for Kruger, I can
turn up judithk.40.35, but if I adjust the URL to ask for
docid=judithk.40, I get judithk.40.40. ï¿½The package was just recently
replicated, so that may be part of the issue, but at the moment,
things seem to be out of sync. ï¿½I don't know if this is expected
(search index is slightly out of date?) or whether this represents a
more serious issue.
I think i found the problem. I queried the xml_queryresult table by "select * from xml_queryresult where docid like 'judithk.40';" and get something
9-05-29</updatedate><param name="dataset/title">Kruger National Park ecological aerial survey data (1998-2007)</param><param
name="creator/individualName/surName">Kruger</param><param name="creator/organizationName">SANParks</param><param name="keyword">Ungulate
population</param><param name="keyword">Aerial survey</param><param name="keyword">Distance methodology</param><param name="keyword">SANParks, South
Africa</param><param name="keyword">Kruger National Park, South Africa</param><param name="keyword">Kruger National Park</param>
You see, the judithk.40.35 is stored in the xml_queryresult table. I think there was a mechanism to delete the cached item when a document was updated.
It seems this mechanism was broken.
It was possible to delete some records in xml_queryresult table. But I am not sure if metacat still works this way. If this is the case, we can delete
the records for judithk.40 then i think the search will work.
I will file a bug report for this issue.
#2 Updated by Jing Tao over 10 years ago
I used a morpho to create a eml document and insert it to metacat. Then i did a search and records was added to xml_queryresult table.
I updated the document in metacat by morpho. After i did that, i checked the xml_queryresult table. The records of the old document were deleted. I did a search again. The result showed the new version of the document.
So i couldn't reproduce this bug.
I will do test by replication as well.