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

Intent to deprecate: prebuilt search index #2976

Closed
squidfunk opened this issue Aug 29, 2021 · 1 comment
Closed

Intent to deprecate: prebuilt search index #2976

squidfunk opened this issue Aug 29, 2021 · 1 comment
Labels
announcement Issue announces news or new features

Comments

@squidfunk
Copy link
Owner

squidfunk commented Aug 29, 2021

TL;DR: the option to prebuild the search index will be removed with the next big iteration of the search functionality of Material for MkDocs. If you're using this option, you can describe your use case and why you might want to keep it.


I'm currently in the process of rearchitecting the search functionality in order to address some of the current shortcomings. The next big iteration of the search will make it much more powerful, adding further abilities for extension (e.g. providing faceted/structural search through arbitrary custom fields).

However, one thing that stands in the way of significant improvement is the option to prebuild the index, because it means that all improvements have to be implemented twice, on the client- and server-side. Even worse, there are two possibilities for prebuilding during build-time – Node.js and Python – which means two separate server-side implementations with two entirely independent sets of dependencies with lots and lots of room for inconsistencies.

I want to keep things simple. Thus, I've decided that support for prebuilt indexes is going to be deprecated removed with the next major release because it gives me much more flexibility in rethinking the search functionality. I can already say that it will definitely be worth it, because the UX of search will be so much better, including:

  • Better search result summaries
  • Rich search results (including code blocks)
  • Faceted search (define custom fields)
  • ... and more

Note that the prebuilding feature was always considered experimental, as denoted in the documentation.

Also interesting: some time ago, I benchmarked prebuilt indexes in #1465 (comment). I also measured the improvements the new search functionality will yield in this tweet, which shows that the upside of prebuilt indexes is shrinking even more.

@squidfunk squidfunk pinned this issue Aug 29, 2021
@squidfunk squidfunk added the announcement Issue announces news or new features label Aug 29, 2021
@squidfunk
Copy link
Owner Author

I've just opened a PR on the Insiders repository with the first draft of the new search functionality, which also removes support for prebuilt indexes. This issue can be considered resolved, as no objections were raised and the benefits of the new search outweigh the questionable benefits of prebuilt indexes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
announcement Issue announces news or new features
Projects
None yet
Development

No branches or pull requests

1 participant