question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Server side search" gets an not-useful wall of text

See original GitHub issue

Details

Expected Result

Simple and appropriate search results. This is what I see with mkdocs serve:

Cursor_and_Get_Started_with_DDEV_-_DDEV-Local_Documentation

Actual Result

On RTD at https://readthedocs.org/projects/test-ddev/ I get a huge wall of text that’s completely not useful:

Get_Started_with_DDEV_-_DDEV-Local_Documentation

I assume this is a result of Server side search because I get very decent results with mkdocs serve.

Is there a way to disable server-side search or fix this somehow?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
squidfunkcommented, Jul 9, 2022

Author of Material for MkDocs here. This happens when you feed a search_index.json that was built with Insiders into the non-Insiders version of Material for MkDocs. Insiders features a completely rewritten search plugin. You only have to make sure that you’re not mixing inside the same environment (be it through caching or other means).

I suspect that search_index.json is served with cache headers that don’t force the browser to re-validate. Now, when you deploy your documentation with non-Insiders afterwards, your browser will use the old search_index.json, but the application bundle (which has content hashes) comes from the community edition, thus the mismatch.

1reaction
squidfunkcommented, Jul 9, 2022

@stsewd adding must-revalidate when serving search_index.json solves the problem. Also, it would mean that users will receive the new search index immediately after a deployment, and not after a day. It’s current set to max-age=86400.

Unless there’s a reason I don’t see why data should be cached for so long. GitHub Pages uses max-age=600.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server keeps sending “text/html” data to the client
However, when I open Postman to test my server side , I get the desired json response from the APIs. Server side code...
Read more >
Server Side Search - Read the Docs
Read the Docs provides full-text search across all of the pages of all projects, this is powered by Elasticsearch. You can search all...
Read more >
HTTP vs HTTPS – What's the Difference? - freeCodeCamp
Hyper Text Transfer Protocol, or HTTP, is a communication method between your browser and the site you want to visit (web server).
Read more >
Logging query text without Profiler - DBA Stack Exchange
I'm intrigued by Server Side Traces, but I don't see an obvious way to log queries from the MSDN doc page. Continuing to...
Read more >
US9009184B2 - Web search with multi-language search input ...
The search engine server delivers web links of websites that provide support ... The text search module 175 utilizes the conjugate English terms...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found