resthighlevelclient

log JSON queries built through ElasticSearch High Level Java Client for debugging?

余生长醉 提交于 2021-01-21 09:13:59
问题 I use ElasticSearch High-Level Client Java API in my Spring Boot application. I want to log the queries built using High-Level client API for debugging purposes. My question is what kind of settings required in my application.properties file to turn on JSON queries built from my application? I tried out the following properties to the application.properties file. However, it does not print the JSON queries built using various query builders. logging.level.org.elasticsearch.client=TRACE

log JSON queries built through ElasticSearch High Level Java Client for debugging?

守給你的承諾、 提交于 2021-01-21 09:12:40
问题 I use ElasticSearch High-Level Client Java API in my Spring Boot application. I want to log the queries built using High-Level client API for debugging purposes. My question is what kind of settings required in my application.properties file to turn on JSON queries built from my application? I tried out the following properties to the application.properties file. However, it does not print the JSON queries built using various query builders. logging.level.org.elasticsearch.client=TRACE

Configure Elasticsearch rest high level client with Basic credential provider

爷,独闯天下 提交于 2020-07-10 10:27:55
问题 This question was asked in the follow-up question to my this SO answer of how to secure JHLRC in this comment, where I explained how to send Basic Credential in Elasticsearch JHLRC request but it was not at the client level and was at the request level. I feel configure at the client level, would avoid repeating the same code again in cases, where you are dealing with only a few users it would be helpful to configure the credentials in the client itself. 回答1: You can follow the below steps as

Create Index Request Mapping is failing in elastic search

百般思念 提交于 2020-06-27 06:11:10
问题 I am trying to create the Join data type in the elastic search index, It is working from the kibana console / via rest but when I try to create the mapping for the index programmatically it fails with the below error, java.util.concurrent.ExecutionException: RemoteTransportException[[3cfb4e163654][172.17.0.2:9300][indices:admin/create]]; nested: MapperParsingException[Failed to parse mapping [properties]: Root mapping definition has unsupported parameters: [my_join_field : {type=join,

Spring boot RestHighLevelClient Elastic Search on combine queries

纵饮孤独 提交于 2020-04-18 05:48:12
问题 I have a domain public class Person { private String name; private String description; private Long positionId; // ---- other props ------ } and I want to search for query string on field name, description and positionId I can make it works by using BoolQueryBuilder but It is not working on _score final BoolQueryBuilder boolQueryBuilder = new BoolQueryBuilder(); final QueryBuilder queryBuilder = QueryBuilders.queryStringQuery("query text"); boolQueryBuilder.filter(queryBuilder);