Our organization has started a project hoping to use sharepoint to create Electronic Records for Clients rather than the paper method which tends to have documents get lost etc.
I have been tasked with interfacing with sharepoint to find documents associated with a given client. Each document has sharepoint metadata that stores a ClientNumber, but I am having issues finding how to use the QueryService web service to search on this specific field. There are about 30 document libraries I am to search through, so believe the QueryService is probably a better fit for this particular situation than ListService.
I am using VB code to do the searching, and the following is the querytext I am sending to the QueryEx Function.
...<QueryText type='MSSQLFT'>
SELECT rank, title, path, Description, Write, Size, author, sitename, FileExtension, HitHighlightedSummary, HitHighlightedProperties, keywords, IsDocument from Scope() WHERE FREETEXT(DEFAULTPROPERTIES,'" & Me.ClientNumber.Text & "') AND IsDocument = 1 ORDER BY Rank DESC -- </QueryText>...
I would like to be able to include something in the WHERE clause that explicitly says a match must be found in the ClientNumber field but I have yet to find a way to do this, and as a result of this we are getting results where other metadata or one of the document properties such as document size is equal to the client number.
I have found documentation that there is a way to expose metadata through property mappings and this then becomes searchable. I however cannot find a way this is done in WSS 3.0, is this a MOSS 2007 only feature, or a feature available in 2010?
If anyone can tell me if there is possibly some other way to search based on metadata, or give some insight as to where I should be looking for more information it would be greatly appreciated.