07-08-2014 08:01 AM
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
07-08-2014 08:17 AM
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
07-08-2014 08:28 AM
Thanks!!
07-08-2014 08:26 AM
Thanks!!!
07-08-2014 08:39 AM
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
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.