Closed champsblanc closed 2 years ago
hello @sirchampsblanc ; so your goal is to have the search index built only for the default language and not for any other language, is that right?
hello @sirchampsblanc ; so your goal is to have the search index built only for the default language and not for any other language, is that right?
Yeah, that's it.
Hi @ultrabug.
I've faced with a related problem in the development of mkdocs-mdpo-plugin. Seems that an internationalization plugin must be able to split search indexes by language, beyond than only searching across the main language.
It is not a simple problem I guess because some files must be patched depending on the theme. In summary, you need to build a search index for each language, replacing the main search index loaded by the theme because it does not make sense to make cross language searches. I've ended creating a patcher class which works for the default themes and mkdocs-material. We can join forces to separate the mkdocs-mdpo code if you find it useful, but I'm not sure if you can use it as is in mkdocs-static-i18n.
Anyways, ask me anything if I can help you. Cheers!
Thanks for the heads-up @mondeja ; I find that helper class intimidating tbh.
I'm not very keen on starting to do magic directly on themes files structure because this will endlessly tie us to their evolution and breaking changes. Maybe what we should do instead is to propose to those theme upstreams to add a configuration option for their search index file lookup?
@sirchampsblanc I think I'm gonna add a configuration option so that you can disable the feature in the meantime.
Thanks for the heads-up @mondeja ; I find that helper class intimidating tbh.
I'm not very keen on starting to do magic directly on themes files structure because this will endlessly tie us to their evolution and breaking changes. Maybe what we should do instead is to propose to those theme upstreams to add a configuration option for their search index file lookup?
@sirchampsblanc I think I'm gonna add a configuration option so that you can disable the feature in the meantime.
We've patched it manually but that feature should be useful for us and maybe other projects.
Thanks.
Hi, is there a way to disable this default behavior?
Our search index is getting too large (with 2 languages) for our server to handle and we're having some issues.
We thought another way to do it would be to use mkdocs-exclude-search to exclude es/* files from the index but we can't make it work. I can ask there too if it should be compatible.
Thanks!