|
25-07-2008, 04:53 AM
When I get back to the office I'll make a diff,
but the gist of it is, on submission of a note, use the built in function to insert all the individual words into the wordlist+hash tables, and copy over the highlight functions and prepare loop used to render highlighting from the actual reply display section also into the notes display section. The built in function uses the post id of the first post in the thread you're posting to as the ref id in the hash table.
Yes, it's an 'ugly' hack (especially the last bit). But what else would you have me do? make an index table just for notes? The reason I did it this way was that after a while I realized it doesn't actually matter (correct me if I'm wrong here) that the hash table is using the post id instead of the ticket/thread id, because when you run a search, it's going to display the result as a ticket and highlight all the instances of the query in the entire ticket rather than just the post that it found the word for (yes - i realize that it wouldve found it for all the posts... but again thats introducing uneeded complexity into the situation). Probably a better way would just be to change or add the field to be ticket id as opposed to post id, and that way would thus make my dirty hack more bearable :P (jk!)
Off topic, I really dislike the wordlist+hash table method for searching. I understand why you've done it, but the fact alone that it prevents substring or partial completion searches is a big hinderance. searching for "test" really should (although with a lower relevance level) return "testing" as well. The highlighting also follows those rules, it only highlights "test" and not "testing"... but I'm sure there was reasoning behind that as well.
On another note, thanks for replying. I hate feeling like I'm being ignored. |