[英]Delete indexes in ElasticSearch correctly
"not updated" then give the restart of their service to pick up the changes. 当我从数据库“ ”中删除一些数据“未更新”时,请重新启动其服务以获取更改。 但是我想正确地做并删除数据。
我的代码正确删除了所有索引,但是当我执行搜索时,其结果显示为count = 0
我想删除但不出现在搜索中 ,怎么办?
我的密码
try {
String formatValue = URLEncoder.encode(veiculo, "UTF-8");
Request.Delete("http://" + PropertiesSingleton.getValue("es.host") + ":9200/oknok/base_gerenciada/_query?q=spec_veiculo:" + formatValue + "&default_operator=AND")
.useExpectContinue()
.version(HttpVersion.HTTP_1_1)
.execute().returnContent().asString();
} catch (IOException e) {
Log.error(this, "Erro ao remover do Elastic Search.", e);
}
我的搜索过滤器
{"from": 0, "size": 0, "query":{"bool":{"must":[{"term":{"last":true}}]}}, "facets": {"filters": {"terms": {"field": "spec_veiculo.raw", "all_terms": true,"size" : 999999, "order": "term"}}}}
搜索结果
{"took":4,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":8375,"max_score":0.0,"hits":[]},"facets":{"filters":{"_type":"terms","missing":0,"total":8375,"other":0,"terms":[{"term":"Abril - Arquitetura & Construção","count":67},{"term":"Abril - Aventuras na História","count":67},{"term":"Abril - Bebe.com.br","count":67},{"term":"Abril - Boa Forma","count":67},{"term":"Abril - Bons Fluidos","count":67},{"term":"Abril - Capricho","count":67},{"term":"Abril - Casa Claudia","count":67},{"term":"Abril - Casa.com.br","count":67},{"term":"Abril - Claudia","count":67},{"term":"Abril - Contigo!","count":0},{"term":"Abril - Elle","count":67},{"term":"Abril - Estilo","count":67},{"term":"Abril - Exame","count":67},{"term":"Abril - Exame PME","count":67},{"term":"Abril - Gestão Escolar","count":67},{"term":"Abril - Guia Quatro Rodas","count":67},{"term":"Abril - Guia do Estudante","count":67},{"term":"Abril - Hotel Pro","count":67},{"term":"Abril - Info","count":67} (...)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.