dotnet / dotnet/docfx

[Bug] Multiple-Word-Search: result presentation is depending on upper-/lower-case of first word.

Open
#8,322 0 comments 2 reactions 0 assignees View on GitHub
search
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

Description

**Describe the bug**
When searching with multiple words, there is a strange behavior. Depending on how the _first_ (!) word is written regarding upper-/lower-case, the presentation (excerpt) of the result is different.
Note: The first search result is always the same article, but the excerpt does not show the part where the search term is used. Therefore the user might not consider this as a valid result and won't click on it.

**To Reproduce**

Here are some examples:

The documentation contains an article which contains the text 'WordA – WordB'.
Notice the " – " part.

Search for 'WordA WordB' --> OK

Search for 'WordA wordB' --> OK
Search for 'wordA WordB' --> **NOK**: first result is the same, but the excerpt shows the wrong part.

Search for 'WordA wORDB' --> OK
Search for 'wORDA WordB' --> **NOK**: first result is the same, but the excerpt shows the wrong part.

Another Example. The documentation contains an article which contains the text 'WordC WordD … WordE'.
Notice the " … " part.

Search for 'WordC WordD WordE' --> OK
Search for 'WordC wORDD WordE' --> OK
Search for 'wordC WordD WordE' --> **NOK**: first result is the same, but the excerpt shows the wrong part.
Search for 'WordC wORDD wORDE' --> OK

**To sum up:** If the first word differs in the upper-/lower-case (in comparison to the text in the article), the excerpt of the result is presented different. Upper-/Lower-case of second and further words do not matter.
Special characters seem to be essential for reproducing the issue. I was not able to reproduce this issue when the article content did not contain ' – ' or ' ... '.

**Expected behavior**
The search should not be case sensitive in general.

**Context (please complete the following information):**
- Browser: edge
- Form factor: desktop
- Docfx version: docfx.console.2.59.4
- Template:default

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.