Giter Site home page Giter Site logo

bboss-elasticsearch's Issues

updateByQuery 遇到子对象的值为null 时会崩溃,期望能捕获跳过null的字段

      "script": {
        "lang": "painless",
        "source": @"""
            ctx._source.tax_category_id=params.tax_category_id;
            ctx._source.tax_category=params.tax_category;
            """,
        "params": {
           "tax_category_id":#[taxCategoryId],
           "tax_category":{
                    "id": #[taxCategory->id],
                    "name":#[taxCategory->name],
		"code": #[taxCategory->code],
                    "remark":#[taxCategory->remark]
                }

如上代码,假设#[taxCategory->code] 当code的值为null时,系统奔溃,期望能捕获这种异常,正常继续往下执行。

分词带空格会报错

String keyword = “the beast”
String ob = clientUtil.executeHttp(elasticsearchIndex + "/_analyze?pretty&analyzer=ik_smart&text=" + keyword, ClientUtil.HTTP_GET);

报错:
org.frameworkset.elasticsearch.ElasticSearchException: java.lang.IllegalArgumentException: Illegal character in query at index 123: XXX:9200/new_test_3/_analyze?pretty&analyzer=ik_smart&text=the beast
@yin-bp

返回数据解析问题

你好,
elasticsearch-sql 查询返回 list
List demos = esDatas.getDatas();
sql中有统计字段,需要自己一层层去解析aggregations内容,不能像elasticsearch-sql的界面一样自动解析成列表吗?

偶发请求失败 failed to respond

版本:
bboss-elasticsearch-rest-6.6.0
bboss-elasticsearch-spring-boot-starter-6.6.0

错误日志:

2023-03-29 22:13:16.902 [http-nio-80-exec-9] ERROR c.m.interaction.tool.domain.es.DiseaseEsRepository - ElasticSearchException 查询失败,e:
org.frameworkset.elasticsearch.client.NoServerElasticSearchException: org.apache.http.NoHttpResponseException: ******.elasticsearch.aliyuncs.com:9200 failed to respond
	at org.frameworkset.elasticsearch.client.ElasticSearchRestClient._executeHttp(ElasticSearchRestClient.java:979)
	at org.frameworkset.elasticsearch.client.ElasticSearchRestClient.executeRequest(ElasticSearchRestClient.java:1270)
	at org.frameworkset.elasticsearch.client.ElasticSearchRestClient.executeRequest(ElasticSearchRestClient.java:1253)
	at org.frameworkset.elasticsearch.client.AbstractRestClientUtil.searchList(AbstractRestClientUtil.java:2593)
	at org.frameworkset.elasticsearch.client.AbstractConfigRestClientUtil.searchList(AbstractConfigRestClientUtil.java:617)
	at com.xxx.xxx.xxx.domain.es.DiseaseEsRepository.searchDisease(DiseaseEsRepository.java:53)
	at com.xxx.xxx.xxx.service.DiseaseService.searchDisease(DiseaseService.java:113)
	at com.xxx.xxx.xxx.api.controller.DiseaseSearchController.searchDiseaseResponse(DiseaseSearchController.java:53)
	at jdk.internal.reflect.GeneratedMethodAccessor543.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:908)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)
	at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:118)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.apache.http.NoHttpResponseException: ******.elasticsearch.aliyuncs.com:9200 failed to respond
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:141)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
	at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
	at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
	at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140)
	at org.frameworkset.spi.remote.http.HttpRequestUtil.sendBody(HttpRequestUtil.java:1285)
	at org.frameworkset.spi.remote.http.HttpRequestUtil.sendJsonBody(HttpRequestUtil.java:1264)
	at org.frameworkset.elasticsearch.client.RestSearchExecutorUtil._executeRequest(RestSearchExecutorUtil.java:103)
	at org.frameworkset.elasticsearch.client.RestSearchExecutor.executeRequest(RestSearchExecutor.java:209)
	at org.frameworkset.elasticsearch.client.ElasticSearchRestClient$5.execute(ElasticSearchRestClient.java:1285)
	at org.frameworkset.elasticsearch.client.ElasticSearchRestClient._executeHttp(ElasticSearchRestClient.java:940)
	... 75 common frames omitted

es配置

spring:
  elasticsearch:
    bboss:
      elasticsearch:
      rest:
        hostNames: ${es host}:${es_port}
        elasticuser: $(es_username}
        elasticPassword: ${es_password}
      http:
        timeoutConnection: 5000
        timeoutsocket: 5000
        connectionRequestTimeout:5000
        retryTime: 1
        maxlinelength: -1
        maxHeaderCount: 100
        maxTotal: 60
        defaultMaxPerRoute: 20
        soReuseAddress: false
        soKeepAlive: false
        timeTolive: 3600000
        keepAlive: 3600000

【反馈】

我的项目中使用了bboss,项目中使用的是es检索,hbase存储。我调用scroll接口,设置了ScrollHandler<ESId>(想获取文档ID)处理函数,在调试中发现项目中这个data(代码引用的地方)变量是空的,我检查了我的索引mapping,我将_source置为了false。我想问一下,这种情况,bboss应不应该获取到_id(用于在hbase取数据)呢?如果不能的话,我另外想办法。

刚刚我试了一下,把_source置为true,ScrollHandler.handle中的ESDatas返回了id值。

基于时间戳的同步问题

5.8.9版本 在数据库中添加3条记录,第一次同步完成后increament_tab表中记录的lastvalue值为20191026104545(这是我最后一条数据的时间)lastvaluetype=1(基于时间戳的) 我在数据库中增加一条数据,在点同步~ 数据无法同步(后台未报错,lastvalue依然是20191026104545) ,

修改成NUMBER_TYPE 基于ID自增的测试 可通过

Amazon OpenSearch

想请问一下,该框架是否支持亚马逊的Amazon OpenSearch搜索引擎呢.(OpenSearch 是 fork 自 Elasticsearch 7.10.2 的开源搜索和分析引擎。)

sql查询日期处理问题

关于sql查询,日期类型问题,elasticsearch返回的columns{
"name":"createTime",
"type":"datetime"
}中关于type描述信息是datetime
日期判断函数如下,无法准确判定匹配会导致转换错误
public static boolean isDateType(ColumnMeta columnMeta){
return columnMeta.getType().equals("date");
}

Kerberos认证

Hello

请问目前是否有支持Kerberos认证的计划呢?

或者目前是否有方式可以注入自定义的Http Client呢?我看源码里头的ClientConfiguration的getHttpClient方法为final实现,似乎无法自行注入自己实现的HttpClient,(如果支持的话,我们自己应该可以尝试下实现简单的Kerberos认证)

新版本和spring boot 的集成的问题

关注作者开发的bboss框架,有新的集成spring boot 的版本。将es 的配置配置在application.properties文件中,但是因为我们公司的约定规范:application.properties 文件是放在resources目录的config目录下,发现当application.properties 文件在此目录的时候,es的配置就不生效。这个可以通过什么办法解决呢?

ES迁移数据量不对

bboss版本:6.2.2
ES版本:7.3.2
ES迁移的时候,日志显示ES2ESDataTranPlugin: Export completed and export total 1000 records
但是目标集群对应的索引有的数据量和源集群一致,有的不一致,丢失了数据。。。
当数据量比较小的时候,数据量基本一致,但是当数据量打到百万千万级别的时候,总差个几千条。。

获取索引表字段信息时报错org.frameworkset.elasticsearch.ElasticSearchException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String

获取索引表字段信息时报错org.frameworkset.elasticsearch.ElasticSearchException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String

RestClientUtil->public List<IndexField> getIndexMappingFields(String index,final String indexType)->IndexField indexField = BuildTool.buildIndexField(field, fields, null)->indexField.setCopyTo((String)fieldInfo.get("copy_to"))

fieldInfo.get("copy_to")返回的是java.util.ArrayList类型,无法强转为java.lang.String类型

image

动态dsl多级循环遍历出错

#if($fieldAndValues)
#foreach($fieldAndValue in $fieldAndValues)
,{
"terms": {
#[fieldAndValues[$velocityCount]->field]: [

        #[fieldAndValues[$velocityCount]->values, serialJson=true]

        ]
      }
    }
#end

#end

fieldAndValues是一个list数组,fieldAndValue是一个对象,里面有一个String[]属性values

caused_by":{"type":"json_parse_exception","reason":"Unrecognized token 'Ljava': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (org.elasticsearch.common.io.stream.ByteBufferStreamInput); line: 14, column: 40]"}},"status":400}]

values识别不是数组类型

这种嵌套数组不能使用 foreach,因为foreach不能使用 #[]

serialJson=true疑问

"terms": {
"notice_code": #[announcementCodes,serialJson = true]
}

announcementCodes为list<String>,为甚么序列化后没有双引号,以下为序列后的实际结果,怎么才能加上双引号
"terms": {
"notice_code": [category_bndbg_szsh, category_yjdbg_szsh]
}

Connection pool shut down

请求过多的时候,会出现以下错误
org.frameworkset.elasticsearch.ElasticSearchException: java.lang.IllegalStateException: Connection pool shut down
Caused by: java.lang.IllegalStateException: Connection pool shut down
at org.apache.http.util.Asserts.check(Asserts.java:34)
at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:191)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:267)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140)
at org.frameworkset.spi.remote.http.HttpRequestUtil.sendBody(HttpRequestUtil.java:1285)
at org.frameworkset.spi.remote.http.HttpRequestUtil.sendJsonBody(HttpRequestUtil.java:1264)Disconnected from the target VM, address: '127.0.0.1:49503', transport: 'socket'

at org.frameworkset.elasticsearch.client.RestSearchExecutorUtil.__executeHttp(RestSearchExecutorUtil.java:67)
at org.frameworkset.elasticsearch.client.RestSearchExecutor.executeHttp(RestSearchExecutor.java:115)
at org.frameworkset.elasticsearch.client.ElasticSearchRestClient$3.execute(ElasticSearchRestClient.java:771)
at org.frameworkset.elasticsearch.client.ElasticSearchRestClient._executeHttp(ElasticSearchRestClient.java:940)
... 61 more

兼容elasticsearch 7.6的updateDocument的问题

你好!在开发的过程中,我的elasticsearch 版本是7.6,发现updateDocument时出现异常,发送的接口是indexName/_doc/_update/documentId,elasticsearch 7.6部分更新的接口是indexName/_update/document

bboss ORM的limit问题、ik问题

  1. limit 问题 select * from table limit from,size 这种语法是否有问题,一直报【逗号】不匹配
    https://user-images.githubusercontent.com/55923514/98760184-b5e83180-240d-11eb-9bd0-5f6c3f4555e2.png
    错误信息:{"error":{"root_cause":[{"type":"parsing_exception","reason":"line 1:68: mismatched input ',' expecting "}],"type":"parsing_exception","reason":"line 1:68: mismatched input ',' expecting ","caused_by":{"type":"input_mismatch_exception","reason":null}},"status":400}

2.ik_max_word问题
https://user-images.githubusercontent.com/55923514/98760414-2e4ef280-240e-11eb-9462-4c3ab359f3a7.png
https://user-images.githubusercontent.com/55923514/98760461-4757a380-240e-11eb-873a-ef6555f11ab1.png
错误信息:{"error":{"root_cause":[{"type":"x_content_parse_exception","reason":"[2:22] [sql/query] failed to parse object"}],"type":"x_content_parse_exception","reason":"[2:22] [sql/query] failed to parse object","caused_by":{"type":"json_parse_exception","reason":"Unexpected character ('é' (code 233)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@7830d98d; line: 2, column: 105]"}},"status":400}
请教下,这种sql写法是否有问题?参考案例是否有?

关于变量替换list的问题

现在有个参数的数据是List类型的,然后数据内容为[“qunar”,"lvmama"],但是在esmapper 文件中替换出来的结果是:

terms": {
                    "source": [ctrip, qunar]
                  }

可以看到ctrip 和qunar未加上双引号,我的变量替换的写法如下

{
                  "terms": {
                    "source": #[sourceList]
                  }
                }

这个问题是什么原因呢,我该怎么写才能够让列表中的变量有双引号?麻烦大牛帮忙解答一下,谢谢了

基于spring boot 的配置,能否支持spring的profiles

在开发的是时候一般会有dev 与production 两个profiles的配置;也所以相应的配置文件会有两份application-dev.properties; application-production.properties 两个配置文件;而现在的的es 的配置只支持放在application.properties 文件里;能否支持根据spring的profile配置切换生产的与测试的es 配置呢?

6.3.0版本 能添加返回es查询语句的功能吗

ESDatas esDatas = //ESDatas包含当前检索的记录集合,最多1000条记录,由dsl中的size属性指定
clientUtil.searchList("demo/demo/_search",//demo为索引表,_search为检索操作action
"test",//esmapper/demo.xml中定义的dsl语句
paramsTotal,//变量参数
Map.class);//返回的文档封装对象类型
esDatas 能把 ESTemplateHelper.evalTemplate(esUtil,templateName, params) 这个解析后的es语句放到ESDatas里吗
我不想只记录在log里,我还要记录到其他地方去,如cat等
感谢 @yin-bp

index的type问题

es7 8之后 type基本上就废除了,以后也不会有了,那么相应的代码是否也要做调整

spring boot ElasticSearch Template [xxxx]@esmapper/search.xml 未定义. at stopping

spring boot ElasticSearch Template [xxxx]@esmapper/search.xml 未定义. at stopping,
can run shutdown hooks after spring bean destroy?

{
"file": "ESTemplateHelper.java",
"method": "evalTemplate",
"line": 53,
"class": "org.frameworkset.elasticsearch.template.ESTemplateHelper"
},
{
"file": "ConfigRestClientUtil.java",
"method": "searchList",
"line": 609,
"class": "org.frameworkset.elasticsearch.client.ConfigRestClientUtil"
},

获取索引的某一个setting失败

bboss版本:6.2.2
ES版本:7.3.2

ClientInterface的getIndiceSetting是获取索引的settings,第二个参数应该是获取指定的setting??当我把该参数设置为index.number_of_shards时,获取失败。DEBUG后发现拼接的路径为:indexName/_settings?index.number_of_shards,这样并不能获取。
通过kibana测试,获取该setting的正确路径应该为:indexName/_settings/index.number_of_shards,返回结果:
{
"indexName" : {
"settings" : {
"index" : {
"number_of_shards" : "1"
}
}
}
}

createIndiceMapping(...)和createTemplate(...) 可以直接读取注解吧?

和 Spring-Boot 的集成里面,既然定义了很多注解,例如 ESIndex,Column,Format 等等,那是不是应该把 ESIndex 注解的属性补全,就不用定义索引创建的 xml 了,当然还应该有一个 ESTemplate 的注解用来定义 Template 中的属性;

这样也更容易使用 createIndiceMapping(...)和createTemplate(...) 来维护索引结构等等;

同时使用注解和 XML 来定义索引结构和字段属性说明,还怎么维护 ORM-Mappings 啊;

支持跨库跨表的整合么?

比如有A、B两张表在两个不同的数据库,A中的一条记录在B表中可能对应有多条,我要整合成一个对象保存到ES中,支持全量和增量同步么?

批量操作返回值数据问题

批量添加doc时,返回的json 字符串结果中缺失result信息,返回结果如下:

{"took":9,"errors":false,"items":[{"index":{"_index":"file","_type":"_doc","_id":"968816971196542976","status":201}},{"index":{"_index":"file","_type":"_doc","_id":"968816971196542977","status":201}}]}

正常Rest client接口返回值如下:

{"took":11,"errors":false,"items":[{"index":{"_index":"file","_type":"_doc","_id":"777","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":28,"_primary_term":1,"status":201}},{"index":{"_index":"file","_type":"_doc","_id":"888","_version":1,"result":"created","_shards":{"total":1,"successful":1,"failed":0},"_seq_no":29,"_primary_term":1,"status":201}}]}

result的值对于反序列化为BulkResponse对象是一个必须值,否则会空指针异常;或者是有没有其他方式将返回的json字符串反序列化下,在文档里没找到相对应的对象。目前来看,其他返回值都可以反序列化为ES high level client的对象,批量操作的因返回值result被裁减存在空指针异常问题。

BulkResponse response = parseEntity(jsonStr, BulkResponse::fromXContent);

bean属性的别名问题

您好,请问当前是否支持名称映射的操作,
比如es中查询出的数据列名为abc
我想映射到实体类的bcd属性上,大概查了一下文档,没有找到相关的说明
麻烦了

spring boot 执行shutdown的时候报错

错误如下:

org.frameworkset.elasticsearch.ElasticSearchException: ElasticSearch Template [prefixWord]@esmapper/esSearchPrefixOther.xml 未定义.
	at org.frameworkset.elasticsearch.template.ESTemplateHelper.evalTemplate(ESTemplateHelper.java:53)
	at org.frameworkset.elasticsearch.client.AbstractConfigRestClientUtil.complateSuggest(AbstractConfigRestClientUtil.java:1002)

有遇到过这个问题吗,请问怎么解决。

考虑下dsl语法高亮支持

有些查询比较复杂,不能格式化,会很乱。
最好能提供插件 支持高亮、格式化,像mybatis那种

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.