Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML search does not provide all the results #2891

Closed
MantasVaitkunas opened this issue Aug 23, 2016 · 9 comments
Closed

HTML search does not provide all the results #2891

MantasVaitkunas opened this issue Aug 23, 2016 · 9 comments
Milestone

Comments

@MantasVaitkunas
Copy link

I did not have any problems till documentation became quite big. At the moment searchindex.js file size is 225.6kb

So now when I'm searching word "Satis" I get only 2 results. I should get at least 16.

I tried to copy document which was not displayed in the search results to new sphinx doc project with less files and search functionality worked perfectly.

Maybe someone had similar issues?

@tk0miya
Copy link
Member

tk0miya commented Aug 24, 2016

Could you give me an example of docs?

I can't reproduce with the following steps:

$ echo Satis >> test.rst
$ make html
# search by "Satis"

@MantasVaitkunas
Copy link
Author

MantasVaitkunas commented Aug 24, 2016

Unfortunately documentation is internal and I can't provide an example :(
I tried to reproduce an issue in the random documentation from readthedocs. Not sure if it's the same issue:
http://pop-php-framework.readthedocs.io/en/latest/search.html?q=methods&check_keywords=yes&area=default# It shows only 1 result from "Applications" page.
But this query should show this page too: http://pop-php-framework.readthedocs.io/en/latest/user_guide/images.html?highlight=method

@Blendify
Copy link
Contributor

We have a similar issue on our site search for terms such as "Blender", or "3D View" all of which are included multiple time in the documentation.

We also have a task on our bug tracker for this:

https://developer.blender.org/T49126

@tk0miya
Copy link
Member

tk0miya commented Aug 25, 2016

@MantasVaitkunas Thank you for example. I got it.

This comes from the keywords which is included in some section title does not match to the content part of the documents.
For example, the following case matched to Satis keyword in foo.rst.

$ echo Satis >> foo.rst
$ make html
# search by "Satis"  => matched to foo.rst

But, after adding new section including the keyword "Satis", foo.rst never matches on searching.

$ cat > bar.rst
Satis
=====
$ make clean html
# searcy by "Satis"  => matched only bar.rst

This behavior comes from the changes at #1067 and 054833a.
It says

Modify the indexer to include the words in the section titles in a separate list. Remove these words from the regular list.

I don't know this is good way for searching. But, as a fact, this behavior confuses many people (including me).

@tk0miya
Copy link
Member

tk0miya commented Aug 25, 2016

@tobiasHeinke It seems your problem is not related with this issue.
Please file a new issue and tell us your case in detail.

@tk0miya tk0miya added this to the 1.5 milestone Aug 25, 2016
@TimKam
Copy link
Member

TimKam commented Sep 19, 2016

@tk0miya Is anybody working on a fix for this?
If not, I might have a look.

@tk0miya
Copy link
Member

tk0miya commented Sep 21, 2016

@TimKam Maybe nobody works about this.
And I don't have enough time for Sphinx.

It would be great if you could help me :-)

TimKam added a commit to TimKam/sphinx that referenced this issue Sep 21, 2016
@TimKam
Copy link
Member

TimKam commented Sep 28, 2016

@tk0miya Could you have a look at my PR? :-)

TimKam added a commit to TimKam/sphinx that referenced this issue Sep 29, 2016
tk0miya pushed a commit that referenced this issue Oct 10, 2016
…2971)

* allow search hits in body text that are in title of other doc #2891

* shorten lines/add line breaks #2891

* remove out-commented LoC, simplify check #2891
@tk0miya
Copy link
Member

tk0miya commented Oct 10, 2016

Now #2971 is merged. Thank you for reporting.

@tk0miya tk0miya closed this as completed Oct 10, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants