From 34314e859a62636ba7d54ce47d54f7c8ac7a32b2 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Mon, 12 Sep 2022 22:47:07 +0300 Subject: [PATCH] Call /reload instead of /regenerate API to update index from web interface - As `/reload` updates index incrementally, it's relatively quick - This makes exposing `/reload` endpoint a better default to expose via the web interface than `the /regenerate' endpoint --- src/interface/web/index.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/interface/web/index.html b/src/interface/web/index.html index 2e65bfbf..81caf140 100644 --- a/src/interface/web/index.html +++ b/src/interface/web/index.html @@ -79,9 +79,9 @@ }); } - function regenerate() { + function updateIndex() { type = document.getElementById("type").value; - fetch(`/regenerate?t=${type}`) + fetch(`/reload?t=${type}`) .then(response => response.json()) .then(data => { console.log(data); @@ -90,7 +90,7 @@ }); } - function incremental_search(event) { + function incrementalSearch(event) { type = document.getElementById("type").value; // Search with reranking on 'Enter' if (event.key === 'Enter') { @@ -148,14 +148,15 @@

Khoj

- +
- + +