jjzjj

elasticsearch-bulk-insert-plugin

全部标签

ruby - Elasticsearch:SearchPhaseExecutionException/解析失败

我在elasticsearch上运行了以下查询curl-XGET"http://localhost:9200/games_201403031340/_search?pretty=true"-d'{"query":{"field":{"title":"ca"}}}'结果我得到了这个错误"error":"SearchPhaseExecutionException[Failedtoexecutephase[query],allshardsfailed;shardFailures{[znmo0cd5Q3S2_ymuDANqKw][games_201403031340][1]:SearchPar

ruby-on-rails - Elasticsearch /轮胎 : How do I filter a boolean attribute?

我想过滤我类(class)的私有(private)bool值,以便它只显示非私有(private)但对我不起作用的资源。(我大大简化了代码)mappingdoindexes:private,type:"boolean"indexes:name,type:"string"endenddefself.search(params)tire.search(load:true,page:params[:page],per_page:20)doquery{stringparams[:query]}ifparams[:query].present?#SofarI'vetried...#filter:

ruby - 使用 ruby​​ pg gem 准备好的 INSERT 语句示例

谷歌搜索了大约半天,我找不到任何使用pggem(postgresqlruby​​gem)准备好的INSERT语句的示例。我试过了(在查看了gem文档之后):deftest2conn=PG.connect(dbname:'db1')conn.prepare("statement1",'INSERTINTOtable1(id,name,profile)VALUES(?,?,?)')end但是我得到以下错误:pgtest.rb:19:in`prepare':ERROR:syntaxerroratornear","(PG::Error)LINE1:INSERTINTOtable1(id,nam

Elasticsearch7.8.0版本入门—— 分页查询文档(高级查询)

目录一、初始化文档数据二、分页查询文档2.1、概述2.2、示例一、初始化文档数据在Postman中,向ES服务器发POST请求:http://localhost:9200/user/_doc/1,请求体内容为:{"name":"zhangsan","age":20,"sex":"男"}在Postman中,向ES服务器发POST请求:http://localhost:9200/user/_doc/2,请求体内容为:{"name":"zhangsan1","age":21,"sex":"男"}在Postman中,向ES服务器发POST请求:http://localhost:9200/user/_d

ElasticSearch——刷盘原理流程

ElasticSearch——刷盘原理流程刷盘原理流程名词和操作解释相关设置刷盘原理流程整个过程会分成几步:数据会同时写入buffer缓冲区和translog日志文件buffer缓冲区满了或者到时间了(默认1s),就会将其中的数据转换成新的segment并写入系统文件缓存,这一步叫refresh其中后台会自动合并小的segment成大的segment;这一步叫段合并当translog达到大小的阈值(默认512M)或者flush默认时长(30m),则会执行flush操作:内存中数据写入新的segment放入缓存(清空内存区)一个commitpoint写入磁盘,表示哪些segment已写入磁盘将缓

ruby - ElasticSearch 术语按整个字段聚合

如何编写考虑整个字段值而不是单个标记的ElasticSearch术语聚合查询?例如,我想按城市名称聚合,但以下返回new、york、san和francisco作为单独的桶,而不是纽约和旧金山作为预期的桶。curl-XPOST"http://localhost:9200/cities/_search"-d'{"size":0,"aggs":{"cities":{"terms":{"field":"city","min_doc_count":10}}}}' 最佳答案 您应该在映射中修复此问题。添加一个not_analyzed字段。如果您

ruby-on-rails - "ruby script/plugin"是命令吗?

我按照在线教程在AppEngine上创建RubyonRails应用程序。有一个其他人可以运行的命令,但它没有在我的Ubuntu10.10上运行:rubyscript/plugininstallhttp://svn.avdi.org/nulldb/trunk/当我尝试运行它时,它会提示:ruby1.8:Nosuchfileordirectoryscript/plugin(LoadError)我的电脑出了什么问题?ruby-v==>1.8.7rails-v==>2.3.10gem-v==>1.3.7 最佳答案 如果使用rails3,cd

ruby-on-rails - 无法通过 Homebrew 启动 elasticsearch 服务器

所以我通过brew安装了elasticsearch:$brewinstallelasticsearch然后当我运行elasticsearch服务器时:elasticsearch-f-Des.config=/usr/local/Cellar/elasticsearch/0.19.3/config/elasticsearch.yml我收到这个错误:{0.20.4}:SetupFailed...-FailedToResolveConfigException[Failedtoresolveconfigpath[/usr/local/Cellar/elasticsearch/0.19.3/con

(二)ElasticSearch使用

一、ES的基本使用1.创建索引 创建一个test索引http://localhost:9200/test 2.删除索引http://localhost:9200/test3.查看索引http://localhost:9200/_all 4.向索引中新增数据http://localhost:9200/person/_doc/ 5.搜索数据http://localhost:9200/person/_doc/_search?q=first_name:wj但是我并没匹配到,后面发现必须写成之前新增的wj8, 二、Kibana使用http://localhost:5601/app/home#/ Kiba

Elasticsearch--02.Kibana8.1.0安装

1.下载安装概述:Kibana是一个针对Elasticsearch的开源分析及可视化平台,用来搜索、查看交互存储在Elasticsearch索引中的数据。使用Kibana,可以通过各种图表进行高级数据分析及展示。下载地址:Kibana8.1.0|Elastic解压到指定目录:tar-xzvfkibana-8.1.0-linux-x86_64.tar.gz-C/opt/module/2.Kibana生成证书文件在es服务器中生成证书、直接回车cd/opt/module/elasticsearch-8.1.0/bin/elasticsearch-certutilcsr-namekibana-dns