cancel
Showing results for 
Search instead for 
Did you mean: 

Search API won't run from workstation

Ted_Broyles
Level 2
When I try to run the a .Net program based on the sample provided in the API Reference CHM document, I get a "Class not registered" error.
 
I can reproduce this using the VB sample.
 
I have the Admin tools installed, is there something else I'm missing?
 
The same code runs fine on the server running Enterprise Vault.
 
 
Also, I can't seem to get the case sensitive search option to work.
When I OR it with another parameter, there are no search results.
 
3 REPLIES 3

MichelZ
Level 6
Partner Accredited Certified
Ted

On EV2007, SP1, there is a thing called "Enterprise Vault 2007 API Runtime"
You could install this one.

As for another EV Version, there are probably some needed DLL's missing.
For example in EV6 / EV7, the ProvisioningAPI.dll is missing there and needs to be copied and registered to get the User Enabling API working....

Haven't used the search API yet, but there is probably the same issue.

Cheers
Michel

cloudficient - EV Migration, creators of EVComplete.

MichelZ
Level 6
Partner Accredited Certified
Ted

I'm currently setting up some EV Test environments.
If you could specify the exact API Example you are using, I could then test it in a day or two.

I'm sure we will find a solution for this :)

Cheers
Michel

cloudficient - EV Migration, creators of EVComplete.

Ted_Broyles
Level 2
I tried the copying over the ProvisioningAPI.dll and registering it, but I still get a "Class not registered" error.
 
Here is my code:
 
 

private void button1_Click(object sender, EventArgs e)

{

SearchQuery query;

IndexSearch2 search;

SearchResults results;

query = new SearchQuery();

search = new IndexSearch2();

results = new SearchResults();

string vaultid = "";

Vault selectedVault = (Vault)VaultList.SelectedItem;

vaultid = selectedVault.EntryId;

string auth = ".";

query.Clear();

query.AddTerm(IndexProperties.IndexPropAUTH, "fred", (int)ESearchQueryFlags.ESQany);

query.AddTerm(IndexProperties.IndexPropRECP, "joan dave", (int)ESearchQueryFlags.ESQall);

query.AddOp((int)ESearchQueryOperators.ESQand,(int)ESearchOperatorScope.ESQdefault); // Combine above two terms with AND (1)

query.AddTerm(IndexProperties.IndexPropAUTH, "mary", (int)ESearchQueryFlags.ESQany);

query.AddTerm(IndexProperties.IndexPropRECP, "alex", (int)ESearchQueryFlags.ESQall);

query.AddOp((int)ESearchQueryOperators.ESQand,(int)ESearchOperatorScope.ESQdefault); // Combine above two terms with AND (2)

query.AddOp((int)ESearchQueryOperators.ESQor,(int)ESearchOperatorScope.ESQdefault); // Combine (1) and (2) with OR

DateTime DateFrom, DateTo;

DateFrom = new DateTime(1999,3,1,0,0,0);

DateTo = new DateTime(2001,7,20,0,0,0);

query.AddRange(IndexProperties.IndexPropDATE, DateFrom, DateTo, (int)ESearchQueryFlags.ESQany);

query.AddTerm(IndexProperties.IndexPropTEXT, "laundry soap.powder -dry.cleaning", (int)ESearchQueryFlags.ESQany);

search.SelectArchive(vaultid);

search.ResultsPropertySet = 3; // 3= full 2 = medium 1 = brief (default);

search.Search(query.Query, 1, 10000, auth);

string tempstr;

 

 

foreach (SearchResult result in results)

{

tempstr = result.Result;

tempstr = (string)result.Prop(IndexProperties.IndexPropSUBJ);

tempstr = (string)result.Prop(IndexProperties.IndexPropAUTH);

tempstr = (string)result.Prop(IndexProperties.IndexPropSSID);

 

}

}