paulh
unread,Oct 19, 2008, 11:52:19 PM10/19/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ResourceSpace
We have been getting some odd search results. After a bit of digging
I found that the resources in question had some unexpected keywords
associated with them. From what I can see from the code, even if I
update the fields in question, these keywords will not be deleted....
This looks like a bug.
My example:
I have a resource with an 'original filename' value of:
genovania(_daughter_of_amelia).jpg
This causes the following keywords to be written to the database:
'genovania' , 'daughter' , 'amelia' , 'jpg' (of is skipped)
But if I query the keywords table with:
SELECT r.resource, r.keyword, r.position, r.resource_type_field,
k.keyword
FROM resource_keyword r, keyword k
WHERE r.keyword = k.ref
AND r.resource = 15078
AND resource_type_field = 51
ORDER BY r.resource_type_field, r.position;
I find the following additional keywords: 'gspshared' , 'photos' ,
'simpson' , 'wajir' , 'selection'
(these are the keywords that are spoiling the search function)
How they got there I do not know ... a bug somewhere else in the code
presumably.
Now let's say I edit the 'original filename' field to have a value of:
genovania(_daughter_of_amelia).jpgx
The code knows what the value was before and after the edit, and it
uses the "before value" to delete the current keywords. It therefore
does not pick up the supplementary values. Would it not be better to
just DELETE ALL KEYWORDS associated to the 'original filename' field?
I hope that is clear enough a description of the problem.
Thanks
Paul
ps. This is sort of related to another post I made about "rebuilding
keyword indexes". With this discovery of slippage between the real
field values and the keywords table wouldn't it be great if we could
run a "rebuild keyword indices" algorithm to ensure that the data is
correct / clean ?