ColdFusion Verity: Can’t find a specific document based on title or filename? Setup the metadata!
September 25, 2007
UPDATE: Thanks to Ben Nadel for pointing out the metadata project at RIAForge. Steve, this should help you in your quest.
I just had a problem where a user was searching our document library for our official letterhead document and the document wasn’t coming up. Basically all they were doing is entering “letterhead” into the search.
My first thought was that maybe the document didn’t get index by Verity, so I re-ran the scheduletask that performs the index, which ran without a hitch. I tried doing the search again and nothing.
Now I forget to mention that I’m using “natural” as the type of search, so I tried to add “url<contains>#keywords#” to do the search. This basically tells Verity to look at the url field in the index (which is the filepath) for the keyword. Again nothing; now anger sets in since it should of worked.
I do another search and decide to dump the query that is being returned to see if something comes to light and it did! I noticed that the titles that verity is giving the documents is coming from the document metadata. Since this particular file was a Word document, it was pretty easy to set the title to whatever I needed it to be to get Verity to pick up on the keyword. I set the title in the metadata to “BSO LetterHead” and performed the search again and bingo, the doucument was found.
So how did I do it? Well in *most* programs when you create a document you can alter the metadata by doing this (I’m going to use word as the example here since most people have it on their machines):
Open up the document and click FILE -> PROPERTIES and then click the SUMMARY tab. You should have a pop-up window that look like the one below.
From here you can set the metadata to whatever you want for the document. Not only is setting the metadata for a document great for Verity, but it’s also helpful for other indexing programs like Spotlight on the MAC, Search within Windows and even the Google Desktop search!
So in closing, if you’re having a hard time trying to get Verity (or any other index and search program for that matter) to pick up a document when performing a search, take the time to setup the metadata within the document itself.
