We have a development instance of CS10 that was recently upgraded from LL 9.7.1. Back when it was 9.7.1 I used these forums to find a C# code example that I converted to VB.NET to allow for searches through lapi. The same code no longer works for searches.
I have a file called Notes.doc sitting one folder down. Within that file the word "server" exists at least once. If I use the CS interface and search on either "notes" or "server" the Notes.doc file is returned.
Here are the guts of the code that I am using:
Dim objRequest As New LivelinkSearch.SingleSearchRequest
Dim objResponse As LivelinkSearch.SingleSearchResponse
objRequest.DataCollectionSpec = "'LES Enterprise'"
objRequest.FirstResultToRetrieve = lngStartRecord
objRequest.NumResultsToRetrieve = lngMaxRecordsToReturn
objRequest.QueryLanguage = "Livelink Search API V1"
objRequest.ResultOrderSpec = "sortByRegion=OTCreatedBy"
objRequest.ResultSetSpec = "lookfor1=anywords&where1=" & strKeyWords & "&boolean2=and&lookfor2=allwords&where2=" & "OTLocation : '" & strOTLocation & "'"
ReDim objRequest.ResultTransformationSpec(2)
objRequest.ResultTransformationSpec(0) = "Score"
objRequest.ResultTransformationSpec(1) = "OTName"
objRequest.ResultTransformationSpec(2) = "OTLocation"
objResponse = objSearch.Search(objSearchAuth, objRequest, strPartitionName)
In all the following cases the search word is "server". When that code is run I get the error "'Score' in the resultTransformationSpec is not allowed when using 'sortByRegion' in the resultOrderSpec".
If I comment out the ResultOrderSpec line or if I remove the "Score" from the ResultTransformationSpec list I get the error "Value cannot be null. Parameter name: source".
I have an open ticket with support for this issue, but it's gone nowhere over the last few weeks. If anyone could either point out what's wrong with the above code or provide a C# or VB example it would be greatly appreciated