vuepress-plugin-fulltext-search icon indicating copy to clipboard operation
vuepress-plugin-fulltext-search copied to clipboard

Search should be work on Internationalized sites

Open hamishwillee opened this issue 4 years ago • 3 comments

The default Vuepress search plugin is aware that you're in a multilingual site, and searches only the current language. As this is now I get the same doc in all translations where there is any common text.

EDIT: Note, I could be incorrect here - the default-header only search may simply not show the translations because most headings are translated. Either way it is a flaw - as a user I am would probably only be interested in matching translations as a "last resort"

hamishwillee avatar Nov 17 '20 23:11 hamishwillee

Hi @leo-buneev Is there any way I can feed the current language of the page being displayed into the plugin? Further, on the home page, if one is displayed, it should/could just use English.

hamishwillee avatar Jan 27 '21 00:01 hamishwillee

vuepress-plugin-fulltext-search is great! But unfortunately I've the same issue when trying to use it on https://www.qownnotes.org/. The whole page, including all translations, is searched when I enter something in the search bar.

pbek avatar Jan 31 '21 16:01 pbek

The way this is done in the default search is here: https://github.com/vuejs/vuepress/blob/38e98634af117f83b6a32c8ff42488d91b66f663/packages/%40vuepress/plugin-search/SearchBox.vue#L86

hamishwillee avatar Apr 29 '21 22:04 hamishwillee