cancel
Showing results for 
Search instead for 
Did you mean: 

Unity Api Idol Full Text Search

Carlos_Guerra
Champ in-the-making
Champ in-the-making

Dear All,

Would you please send me an example of a Unity Script using the Idol FUll Text Search?

If I'm using A Unity Script running outside the onbase like from a WebPage, Would the results show me the column "Score"?, and Is there a way where If I get the file, the word that I'm Searching for with the "Idol Full Text Search" comes with a yellow mark just like the way it works the "Idol Full Text Search" when I using it in the Unity Client

Regards

4 REPLIES 4

Nathan_Kossover
Star Contributor
Star Contributor

You will need to create a DocumentQuery,and then call AddTextSearchConstraintMethod() on it. A quick example might look like this:

// assumes _application is properly initialized Hyland.Unity.Application
DocumentQuery DocumentQuery docQuery = _application.Core.CreateDocumentQuery();
// Uses IDOL to search for the string "sample"
docQuery.AddTextSearchConstraint( TextSearchType.IDOLFullTextSearch, "sample");
DocumentList results = docQuery.Execute(100);



Of course, you would want to add some document types, keywords or other constraints to the DocumentQuery to make it perform better, but this is the general idea.

If you wanted the "Score" to come back, you would need to add that DisplayColumn to the query and then use ExecuteResults() instead of Execute().

// assumes _application is properly initialized Hyland.Unity.Application 
DocumentQuery DocumentQuery docQuery = _application.Core.CreateDocumentQuery();
// Uses IDOL to search for the string "sample"
docQuery.AddTextSearchConstraint( TextSearchType.IDOLFullTextSearch, "sample");
docQuery.AddDisplayColumn(DisplayColumnType.FullTextScore);
using (QueryResult docResults = docQuery.ExecuteQueryResults(100))
{
// loop through results, get display column here
}


There is not a way to retrieve a version of the document with the search results highlighted in yellow via the Unity API.

For further information, see the SDK articles about Hyland.Unity.DocumentQuery.

NOK

Thanks!!

Carlos_Guerra
Champ in-the-making
Champ in-the-making

Thanks!!!

Joe_Kocsis
Confirmed Champ
Confirmed Champ

As a side note, there was an SCR  ( 190853) submitted to allow the hit highlights to be visible on a returned document, which has been rejected. More information on that can be found here: https://www.onbase.com/community/technical_communities/onbase_apis/f/10815/t/17591.aspx