Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the site plug-in of elasticsearch

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to use the site plug-in of elasticsearch". In the daily operation, I believe many people have doubts about how to use the site plug-in of elasticsearch. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "how to use the site plug-in of elasticsearch". Next, please follow the editor to study!

Now let's use bootstrap+angularJs to write a simple page, a site plug-in, which accesses the operation log through the translogRest plug-in we developed earlier and shows it.

Toggle navigation operation log Create, save, delete View operation type Version type routing parent class TTL time operation {{item.opType}} {{item.version}} {{item.type}} {{item.routing} } {{item.parent}} {{item.ttl}} {{item.timestamp | date:'yyyy-MM-dd HH:mm'}} View × ID: {{editItem.id}} Close var module = angular.module ('app' []) Function translogCtrl ($scope, $http) {$scope.getData = function () {var file = $scope.file $http.get ('http://localhost:9200/_translog', {params: {file: file, size: 12}}) .success (function (data, status, headers) Config) {$scope.itemList = data $scope.view = function (id) {var item = $scope.itemList [id]; $scope.editItem = item Try {$('# prettyJson') .html (pretty.parse (eval ("(" + item.source + ")") } catch (error) {$('# prettyJson') .html (pretty.error (error));} $('# editPanel') .modal ('show') Error (function (data, status, headers, config) {console.info (data);});}}

Then we can copy and apply it under plugins\ translogView\ _ site. We can also supplement the plug-in description file _ site\ es-plugin.properties

Description=view translog

Enter in the browser

Http://localhost:9200/_nodes?all=true

You can see that our plug-in has been successfully installed and the description information is available.

At this point, the study on "how to use the site plug-in for elasticsearch" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report