fopp icon indicating copy to clipboard operation
fopp copied to clipboard

Searching for "turtle.write" returns results where "turtle" and "write" separately

Open sahi1l opened this issue 6 years ago • 1 comments

Describe the bug For example, when I search for turtle.write in the textbook, it returns pages that include the words turtle and write.

To Reproduce Steps to reproduce the behavior:

  1. Go to Search.
  2. Type in turtle.write or "turtle.write"
  3. See that the results have the words "turtle" and "write" highlighted separately.

Expected behavior Only pages which include "turtle.write" together (including the dot) should appear.

sahi1l avatar Sep 13 '18 15:09 sahi1l

From looking at the FOPP codebase, the search function that's being implemented is written by 'Sphinx team'. The file is called searchtools.js located in build/fopp/_static folder of FOPP. It seems to be generating some kind of search index (Data Structure: List of key value) and is in a file searchindex.js. The file is located in build/fopp folder. Couldn't find search files besides in build folder. There some part in the searchtools.js file that seems to split in .. screen shot 2019-01-25 at 3 57 22 pm

Also, it seems like the search depends on what words are indexed? Cannot find my_turtle.up() as well which is in the textbook. The result for this search is empty.

Now I think, besides searching for words with ., what all we want to be found with search functionality.

dichharai avatar Jan 25 '19 23:01 dichharai