Jelajahi Sumber

impl normalize button

Yuki Takei 6 tahun lalu
induk
melakukan
7e6e935690

+ 9 - 0
src/client/js/components/Admin/FullTextSearchManagement/RebuildIndex.jsx

@@ -76,7 +76,16 @@ class RebuildIndex extends React.Component {
   }
   }
 
 
   async normalizeIndices() {
   async normalizeIndices() {
+    const { appContainer } = this.props;
+
+    try {
+      await appContainer.apiv3Put('/search/indices', { operation: 'normalize' });
+  }
+    catch (e) {
+      toastError(e);
+    }
 
 
+    this.retrieveIndicesStatus();
   }
   }
 
 
   async rebuildIndices() {
   async rebuildIndices() {