Search for two-character term Fails -- Fix?

Having trouble installing Oxygen? Got a bug to report? Post it all here.
manthony
Posts: 22
Joined: Mon Jan 20, 2014 11:44 pm

Search for two-character term Fails -- Fix?

Post by manthony »

Hi,

We have a two character term in our documentation "S3" and we'd like it to be returned by the search. I've checked out the nwSearchFnt.js file and it appears that around line 118:

var txt_enter_at_least_1_char = "You must enter at least one character.";

Is there a means to configure to allow this search through? It appears the code is letting this through but not actually searching.

Mary
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Search for two-character term Fails -- Fix?

Post by sorin_ristache »

Hi Mary,

In the nwSearchFnt.js file in the function contains please modify the line 424:

Code: Select all

    if (word.length > 2) {
to:

Code: Select all

    if (word.length > 1) {
The English words that are used very often like no, or, on, be, is, if, it, etc will not be returned as result words, but your rare words (S3, etc) will be returned.


Regards,
Sorin
Sergio_7
Posts: 9
Joined: Fri Sep 15, 2023 9:56 am

Re: Search for two-character term Fails -- Fix?

Post by Sergio_7 »

Hi everyone,

I know that this topic is already very old, but I hope that you can show me a solution here. Our problem is that our product names, some of which consist of 2 letters, are not found in the search. I use Oxygen 26.1 and would like to know if there is an easy way to customize the search in my existing HTML template so that results are displayed from two characters.

Many thanks in advance for your support!
marius
Posts: 52
Joined: Thu Mar 05, 2009 11:44 am

Re: Search for two-character term Fails -- Fix?

Post by marius »

Hi,

It was a bug in the initial build of Oxygen 26.1 that was fixed in the next maintenance build. Please update your installation with the latest build available on our website::
image.png
Regards,
Marius
You do not have the required permissions to view the files attached to this post.
Marius Ciolacu
Syncro Soft / Oxygen XML
Sergio_7
Posts: 9
Joined: Fri Sep 15, 2023 9:56 am

Re: Search for two-character term Fails -- Fix?

Post by Sergio_7 »

Awesome! That works! Many thanks, Marius!
pacetti
Posts: 1
Joined: Fri Jul 05, 2024 6:13 pm

Re: Search for two-character term Fails -- Fix?

Post by pacetti »

I have just installed the latest build, and I am still seeing a similar issue.
If I want to find help topics for the query "Manage My Team(s)", no results are returned if "My" is included in the query.
Queries "Manage Team(s)", "Manage", and "Team(s)" return results as expected.
My stopwords file is as follows:

Code: Select all

// Auto generated list of analyzer stop words that must be ignored by search.
var stopwords = ["but","be","with","such","then","for","no","will","not","are","and","their","if","this","on","into","a","or","there","in","that","they","was","is","it","an","the","as","at","these","by","to","of"];
I do not have any include/exclude parameters set, either:
image.png
You do not have the required permissions to view the files attached to this post.
Costin
Posts: 846
Joined: Mon Dec 05, 2011 6:04 pm

Re: Search for two-character term Fails -- Fix?

Post by Costin »

Hi pacetti,

We tested but did not obtain the reported behavior, using the latest build of Oxygen.
In order to look into this further, please send us a small sample topic which we could use to reproduce the issue at our side.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Post Reply