Search in DITA-OT 2.5.4 - webhelp-responsive output

108 views
Skip to first unread message

Dipchandan Kalita

unread,
Jun 1, 2020, 10:17:24 AM6/1/20
to DITA-OT Users
Hello everyone,

We are using using DITA-OT 2.5.4 to generate webhelp responsive output and host in our documentation website. However, we are seeing some issues with the search. I am trying to customize the plugin to get the desired result, however, I am not anywhere close to this. I need some guidance on this. Here are some of the issues that I am trying to fix:

1. The number of search results are high. When I search for a phrase that has three words, it brings up all the results that contain any one of these three words. We can use double quotes to filter the results, however, it doesn't give the related results. It gives only the results with the exact match. Is there way way that we can limit the search results without using double quotes? Here is a search query for your reference: https://www.ge.com/digital/documentation/predix-apm/search.html?searchQuery=asset+health+manager

2. The short description in the search result displays only a part of the first sentence of the html file. Because of this, some of the search results looks irrelevant even if it contains the exact phrase somewhere down the html file. Is there a way to highlight the part in the topic where the search term is available?

3. The sorting of the search result is based on the scoring. I would like to customize it as per our requirement. For example, the content in the <title> tag should have the highest scoring. I tried updating the scoring.properties file. However, it didn't work.  Is there a way to update the scoring?

4. The items in the search results displays the <h1> tag of the html files, which is the section name in our case. In the same html file, we have the topics under <h2>. Is there a way to display the <h2> items in the results page?

Thank you in advance.

Radu Pisoi

unread,
Jun 8, 2020, 2:55:28 AM6/8/20
to DITA-OT Users
Hi,

Thank you for reporting these issues. See my answers inline:


1. The number of search results are high. When I search for a phrase that has three words, it brings up all the results that contain any one of these three words. We can use double quotes to filter the results, however, it doesn't give the related results. It gives only the results with the exact match. Is there way way that we can limit the search results without using double quotes? Here is a search query for your reference: https://www.ge.com/digital/documentation/predix-apm/search.html?searchQuery=asset+health+manager

You can use boolean search to find topics that contains all words like: asset AND health AND manager.


2. The short description in the search result displays only a part of the first sentence of the html file. Because of this, some of the search results looks irrelevant even if it contains the exact phrase somewhere down the html file. Is there a way to highlight the part in the topic where the search term is available?
 
The short description presented in search result is not dynamically generated when compute the search result.
We extract the topic short description and store it in the search index at publishing time. So, I don't find any way to highlight the part in the topic where the search term is available.
 

3. The sorting of the search result is based on the scoring. I would like to customize it as per our requirement. For example, the content in the <title> tag should have the highest scoring. I tried updating the scoring.properties file. However, it didn't work.  Is there a way to update the scoring?

 It seems to be an issue on this part. I will register this issue on our side.
 

4. The items in the search results displays the <h1> tag of the html files, which is the section name in our case. In the same html file, we have the topics under <h2>. Is there a way to display the <h2> items in the results page?

 
Could you give us more details about your use case? Do you use DITA chunking feature(chunk="to-content") when generate WebHelp output and you want to narrow the search scope to inner topics?

For future question you can contact us on support[at]oxygenxml.com.
 
Regards,
Radu
--
Radu Pisoi
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Reply all
Reply to author
Forward
0 new messages