From 754ffa9ad11646e3a180c501e2d05837eaa8ca57 Mon Sep 17 00:00:00 2001 From: Keerthi Niranjan Date: Thu, 21 Dec 2017 13:46:32 +0530 Subject: [PATCH] SEARCH-544 - Added an api to remove real-time indexing --- demo/search.html | 1 + js/search/search.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/demo/search.html b/demo/search.html index 90e7b7b4..0ba38a59 100644 --- a/demo/search.html +++ b/demo/search.html @@ -220,6 +220,7 @@ }); sendMessage.addEventListener('click', function () { + search.deleteRealTimeFolder(); if (realTimeIndexing.value !== "") { let message = realTimeIndexing.value; search.batchRealTimeIndexing(JSON.parse(message)); diff --git a/js/search/search.js b/js/search/search.js index 26306b66..6f0ad02b 100644 --- a/js/search/search.js +++ b/js/search/search.js @@ -358,6 +358,11 @@ class Search { }); } + deleteRealTimeFolder() { + Search.deleteIndexFolders(this.realTimeIndex); + Search.indexValidator(this.realTimeIndex); + } + /** * This the query constructor * for the search function