|
|
@@ -6,10 +6,21 @@ class FullTextSearchManagement extends React.Component {
|
|
|
super();
|
|
|
}
|
|
|
|
|
|
+ Buildindex(event) {
|
|
|
+ const axios = require('axios').create({
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ 'X-Requested-With': 'XMLHttpRequest',
|
|
|
+ },
|
|
|
+ responseType: 'json',
|
|
|
+ });
|
|
|
+ axios.post('http://localhost:3000/_api/admin/search/build');
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
return (
|
|
|
<Fragment>
|
|
|
- <button type="submit" className="btn btn-inverse">Build Now</button>
|
|
|
+ <button type="submit" className="btn btn-inverse" onClick={() => { return this.Buildindex() }}>Build Now</button>
|
|
|
</Fragment>
|
|
|
);
|
|
|
}
|