From d72ebb1bdb3fbd3301a9fdfab6ce1fd9f12f85cd Mon Sep 17 00:00:00 2001
From: Jake G <106644+Jieiku@users.noreply.github.com>
Date: Fri, 28 Apr 2023 12:50:54 -0700
Subject: [PATCH] Fix multi-lingual json index (#2197)

* Fix multi-ligual json index

* multi-lingual search Fix cargo fmt
---
 components/site/src/lib.rs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs
index b40e0b5c..f2cb1951 100644
--- a/components/site/src/lib.rs
+++ b/components/site/src/lib.rs
@@ -787,11 +787,7 @@ impl Site {
     }
 
     fn index_for_lang(&self, lang: &str) -> Result<()> {
-        let index_json = search::build_index(
-            &self.config.default_language,
-            &self.library.read().unwrap(),
-            &self.config,
-        )?;
+        let index_json = search::build_index(lang, &self.library.read().unwrap(), &self.config)?;
         let (path, content) = match &self.config.search.index_format {
             IndexFormat::ElasticlunrJson => {
                 let path = self.output_path.join(format!("search_index.{}.json", lang));