Page 1 of 1

Customizing search results using keywords

Posted: Tue Mar 10, 2015 4:51 pm
by caval
We've noticed that the threshold for the search indexing seems to be 3 chars or greater.

So the 3GPP S6a interface is indexed and shows up in the search results, but the S9 interface does not appear.

Based on other posts suggesting that adding metadata keywords is a way to prioritize search results, we tried adding metadata keyword for S9 but this does not resolve the problem.

Is there a way to force the index function to recognize a term such as S9 or, alternatively, to insert custom search terms in the indexing function?

(This problem relates to Oxygen 16.1 webhelp).

Re: Customizing search results using keywords

Posted: Tue Mar 10, 2015 4:56 pm
by caval
I noticed in your documentation that you do point out this limitation of 3 or more characters. Fair enough. I'm still wondering if there is a way to force indexing of certain keywords that are only 2 chars.

Re: Customizing search results using keywords

Posted: Tue Mar 10, 2015 5:26 pm
by sorin_ristache
Sorry, in the current version (16.1) the threshold is 3 characters and it can't be forced down or circumvented with custom search terms. However starting with the next version (17.0) the threshold will be lowered to 2 characters for non-Asian languages and 1 character for Asian languages.

The initial threshold of minimum 3 characters was imposed to filter out common words like to, or, an, is, etc. that would not increase the search accuracy anyway if they were allowed. But cases like your S9 search term prompted us to lower the threshold.

Re: Customizing search results using keywords

Posted: Mon May 11, 2015 8:43 pm
by caval
Greetings,

Was this update enabling search for strings of 2 characters (such as Gx, Gy, Sy, etc.) included in the recent v17 of the webhelp?

Re: Customizing search results using keywords

Posted: Wed May 13, 2015 12:17 pm
by Radu
Hi,

Sorry for the delay.
I think we had a previous email conversation, I will also try to update this thread with my suggestions:

The good news seems to be that the indexer which builds the index tables has been modified to also index words composed of two letters.
So the only issue would be to make some small Javascript changes.

If you have the time, please open the Javascript file:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/com.oxygenxml.webhelp/oxygen-webhelp/search/nwSearchFnt.js

find the function called:

Code: Select all

function contains(arrayOfWords, word)
which has an if clause like:

Code: Select all

if (word.length > 2 || indexerLanguage == "ja") {
You can let the code inside the if clause execute all the time, so just comment out the if statement like:

Code: Select all


     //if (word.length > 2 || indexerLanguage == "ja") {
found = false;
for (var w in arrayOfWords) {
if (arrayOfWords[w] === word) {
found = true;
break;
}
}
//}
Also at the beginning of the function called:

Code: Select all


 function realSearch(expressionInput)
add this line:

Code: Select all


 expressionInput = expressionInput.trim();
like:

Code: Select all


 function realSearch(expressionInput) {
expressionInput = expressionInput.trim();
............
And one more thing to do, search in the same Javasacript file for:

Code: Select all

...finalArray[x].length > 2....
and replace it with a greater than:

Code: Select all

...finalArray[x].length >= 2....
Then publish to WebHelp and try to see if this works for you.

Regards,
Radu

Re: Customizing search results using keywords

Posted: Thu May 14, 2015 4:50 pm
by caval
Thanks Radu. This solution works well in our tests.

Re: Customizing search results using keywords

Posted: Tue Aug 08, 2023 5:47 am
by galanohan
Hi Radu,

I noticed that in the webhelp output, no matter it's a custom or a built-in webhelp scenario, Chinese keywords with more than 3 characters are not searchable. For example, although certain topics contains "物联网" (3 chinese characters) in both and headings, but in the webhelp output, only keywords like "物联" or "物" return search results, while "物联网" does not.

I tried to modify the js file as you mentioned above, finding that the file path has changed for a while. Now there are two folders: com.oxygenxml.webhelp.common and com.oxygenxml.webhelp.responsive under C:\Program Files\Oxygen XML Editor 25\frameworks\dita\DITA-OT3.x\plugins. So which folder and files should I modify to customize the upperthreshold of asian-language keywords?

Re: Customizing search results using keywords

Posted: Tue Aug 08, 2023 7:01 am
by Radu
Hi,
The advice on this thread was given about 8 years ago, much has changed on the WebHelp search functionality, so I no longer consider what I wrote here to apply to the latest Oxygen releases. I see you have asked the same thing on other channels so maybe my colleagues from the WebHelp team will reply to you on those channels with the details that you want.
Regards,
Radu

Re: Customizing search results using keywords

Posted: Tue Aug 08, 2023 8:49 am
by galanohan
Thanks!

Re: Customizing search results using keywords

Posted: Wed Aug 09, 2023 6:59 pm
by alin
Hello,

Starting with version 3.0, Oxygen Feedback can be configured as an external search engine for the Oxygen WebHelp Responsive output.
Oxygen Feedback represents a server-side alternative to the default client-side search engine embedded in the WebHelp output.

The main benefits of configuring Oxygen Feedback to search your HTML content are:

- The search process is faster because it is performed on the server
- The content index is kept up-to-date when content is republished
- You can configure the language used for the indexing process

To configure Oxygen Feedback as an external search engine in Oxygen WebHelp, you must activate the indexing functionality in the current version of our site configuration.

:!: Please note that this functionality requires the output to be generated using Oxygen WebHelp version 25 or later.

In Oxygen Feedback 3.0 a new Content Indexing and Search section was added in the Version Settings page.
This new section has an option to enable or disable the content indexing functionality.

When content indexing is enabled for a site's version, the corresponding WebHelp Responsive output will use Oxygen Feedback as the search engine when users search the published content.
If content indexing is disabled, the search will be performed using the JS Search Engine bundled in the WebHelp Responsive output.

Once Content Indexing is enabled, you can also choose the language that the search engine will use for the indexing process.
This will allow Oxygen Feedback to use language specific rules when analyzing the indexed content.
Oxygen Feedback indexes the HTML content available at the Base URL of the current site configuration version.

You can find more details about how to replace the default search engine of the Oxygen WebHelp Responsive output with a search engine powered by Oxygen Feedback in this webinar.

Regards,
Alin

Re: Customizing search results using keywords

Posted: Thu Aug 10, 2023 4:48 am
by galanohan
Thanks for the reply, Alin.

I looked in the pricing page of OF finding that there's a limitation per license plan like this:
image.png
image.png (5.49 KiB) Viewed 1385 times
I'm curious about the definition of moderators in that page. Does it refer to the number of internal users with a moderator role? Or it refers to all users with roles as site admin, system owner and moderators?
Let's say if I pick plan B the Team version, can I have 1 system owner, 1 admin, and 4 moderators at top? or 1 owner, 1 admin, 2 moderators at most?

Looking forward to your reply.

Thank you!

Re: Customizing search results using keywords

Posted: Thu Aug 10, 2023 10:18 pm
by alin
Hello,

The members of your current organization can be assigned with moderation roles (Admin or Moderator). This way they will be able to moderate comments on the associated sites or perform other administrative tasks (see more details here). The roles can be assigned at site level or at organization level. When a role is assigned at organization level it is applicable on all sites that belong to that organization.

The subscription has a limit for the number of Moderators that can be added to a site configuration.
The number of allowed moderators per site configuration = site-level moderators + organization-level moderators + pending moderator invitations.
This means that you cannot invite a new user with a role of Moderator or change a user's role to Moderator if at least one site configuration within the organization has already reached the limit.

The owner of the organization is not taken into account for the limit of moderators included in the subscription. Only users who have been assigned with an Admin or Moderator role are taken into account.

In your case, for an organization with an active Team subscription plan, you can have one organization owner and 4 users with moderation rights (with a role of Admin or Moderator).

Regards,
Alin

Re: Customizing search results using keywords

Posted: Mon Aug 14, 2023 12:27 pm
by galanohan
Thanks for the reply!

Re: Customizing search results using keywords

Posted: Tue Aug 15, 2023 9:08 am
by galanohan
@Alin

Hi Alin,

Thanks for the preceding answer. I configured and deployed a webhelp output to my company site, it looks pretty good to me. One thing I'm curious about block-level comments, I noticed block-level comment feature isn't available in html pages converted from markdown. Is that a bug or by design?

Re: Customizing search results using keywords

Posted: Tue Aug 15, 2023 1:21 pm
by galanohan
@Alin

I enabled the content indexing for the content published for the single site, however, searching with keyword with more than 2 chars doesn't work either. Btw, the comment system works pretty well.
image.png
image.png (13.34 KiB) Viewed 1292 times
image.png
image.png (23.93 KiB) Viewed 1292 times

Re: Customizing search results using keywords

Posted: Wed Aug 16, 2023 3:39 pm
by alin
galanohan wrote: Tue Aug 15, 2023 9:08 am @Alin

Hi Alin,

Thanks for the preceding answer. I configured and deployed a webhelp output to my company site, it looks pretty good to me. One thing I'm curious about block-level comments, I noticed block-level comment feature isn't available in html pages converted from markdown. Is that a bug or by design?
Hello,

The block-level comments feature is enabled by default but the widget is available only on HTML elements having the @data-ofbid attribute set to a non-empty value. The value must be unique within the current page.
For more details see: https://www.oxygenxml.com/doc/versions/ ... 4p_lw5_q4b

Regards,
Alin

Re: Customizing search results using keywords

Posted: Thu Aug 17, 2023 9:49 am
by alin
galanohan wrote: Tue Aug 15, 2023 1:21 pm @Alin

I enabled the content indexing for the content published for the single site, however, searching with keyword with more than 2 chars doesn't work either. Btw, the comment system works pretty well.
image.png
image.png
We'll continue the investigation of this issue on this thread: common-problems-f40/topic26058.html