How can we programmatically drive the Full Document Search in Document Ultimate?
Question asked by David Arnold - March 10 at 3:53 PM
Answered
We have a case where we need to display documents via the DocumentUltimate viewer, but we also need to programmattically drive the Full Document Search capability by feeding search text to it from code. The Full Document Search provides an indexed reference in the web UI to each matched item, which the Highlighted Keywords option does not provide (unless I'm missing something). Otherwise, the Highlighted Keywords parameter would work for our needs.
 
Is this request to drive Full Document Search from code possible? Or is there a way to generate a "search hit index" in the UI like the Full Document Search does? 
 
Accessing the parameters and client-side code to drive the full document search seem to be embedded in the ExtJS framework that DocumentUltimate (and FileUltimate) also uses.  I've had to dig into this framework somewhat before on the FileUltimate side, but it seems a little more involved than I have time for in this particular case.
 
Thanks to anyone who may have suggestions!
 

2 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
Hi,
 
need to programmattically drive the Full Document Search capability
 
Basically you need a property like HighlightedKeywords but which does full text search instead of simple search.
By the way when you use HighlightedKeywords, on the right panel it also gives the found positions which are clickable.
 
However I think “Full Document Search” results on the left panel are more useful. So this is a good feature suggestion.
 
I will let you know shortly.
0
Cem Alacayir Replied
Employee Post
FYI, this feature is now ready, see it live in action:
 
Version 3.12.0 - March 12, 2018
  • Added: Better auto full text search and highlight feature. New SearchOptions property replaces HighlightedKeywords and HighlightedColor properties and offers more advanced options like MatchOptions. SearchOptions settings are also reflected as default values in the UI. If you specify SearchOptions.Term, an automatic search will be done when the document is displayed, i.e. the specified term will be searched and results with clickable positions will be listed on the left pane and the term will be highlighted in the pages. For example, if you launch the document viewer from a search results page, you can pass the same search term to the viewer.

    Usage example which demonstrates auto searching term "bicycle bells" with MatchAnyWord option:

    C#
    documentViewer.SearchOptions.Term = "bicycle bells";
    documentViewer.SearchOptions.MatchOptions = MatchOptions.MatchAnyWord;

    or in WebForms:

    <GleamTech:DocumentViewerControl ID="DocumentViewerControl" runat="server" 
       SearchOptions-Term="bicycle bells"
       SearchOptions-MatchOptions="MatchAnyWord" />

    In this example "bicycle bells" or "bicycle" or "bells" keywords will be highlighted and displayed in search results.

    API changes:

    - HighlightedKeywords="keyword" -> SearchOptions-Term="keyword"
                                       documentViewer.SearchOptions.Term = "keyword"
    
    - HighlightedColor="red" -> SearchOptions-HighlightColor="red"
                                documentViewer.SearchOptions.Highlig

Reply to Thread