Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
think_elasticsearch
Advanced tools
以elasticsearch.js为基础,elasticsearch操作工具。
thinknode,thinkorm,nodejs,elasticsearch
#功能
1.支持根据模型生成索引map(前提索引必须存在),并会在模型mappingg变化后动态改变索引map,因为es不支持以后map的field类型修改因此当模型mapping中字段类型变化时,采用重建索引迁移数据,并使用es别名功能保证模型名不变的方式进行迁移。因此不建议重复修改mapping字段类型
2.新增,批量新增,查询,聚合功能。
#示例(见test目录下)
1.colleaction.js
elasticsearch的mapping只能添加不能修改,因此当mapping的field变化时,只能重建索引并迁移数据,为了保证模型名称不变,采用elasticsearch的别名方式
同时对于未在mapping表示的field,而插入数据时,es会自动进行匹配
2.add.js写入数据。
3.addAll.js批量写入数据
4.select.js查询
es的查询分为match和filter查询,match是全文检索,根据相关度匹配,filter是精确查找
5.sum_avg_min_max.js 求和,平均值,最大值,最小值
6.simple_aggs.js 聚合功能。
普通分组聚合,类似关系数据库group。
7.match_filter_aggs.js 过滤查询与聚合
可分为先过滤再聚合,只过滤聚合数据未实现后置过滤器
8.date_histogram_aggs.js 按时间序列进行数据分析
ES最常用的时间序列分析方法。可对时间分组后进一步聚合 。
#贡献者
richenlin richerdlee
#协议
MIT
FAQs
基于elasticsearch.js的elasticsearch工具
The npm package think_elasticsearch receives a total of 24 weekly downloads. As such, think_elasticsearch popularity was classified as not popular.
We found that think_elasticsearch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.