Questions Tagged With elasticsearchhttps://answers.axonivy.com/tags/elasticsearch/?type=rssquestions tagged <span class="tag">elasticsearch</span>enWed, 24 Jun 2020 05:41:36 -0400Elastic search End of life version, need to upgradehttps://answers.axonivy.com/questions/4615/elastic-search-end-of-life-version-need-to-upgrade<p>Hi ivy team,</p> <p>Currently we are using ivy: <strong>Axon.ivy Engine 7.0.11.1903290958</strong> In this version, we used <strong>Elastic search version 5.5.0</strong> (default of the engine, defined here: <a href="https://developer.axonivy.com/doc/7.0/readme-engine">https://developer.axonivy.com/doc/7.0/readme-engine</a> ) </p> <p>But we run into the security check issue: Elastic search End of life version (check here: <a href="https://www.elastic.co/support/eol">https://www.elastic.co/support/eol</a>)</p> <p>I want to setup an external Elastic search with the newer version to pass the security check.</p> <p>So, my question is that: Which is the <strong>latest Elastic version</strong> that can be supported by <strong>Axon.ivy Engine 7.0.11.1903290958</strong> ?</p> <p>Thanks for your supporting,</p> <p>DK</p>khanh11166Wed, 24 Jun 2020 05:41:36 -0400https://answers.axonivy.com/questions/4615/elastic-search-end-of-life-version-need-to-upgradeengineelasticsearchHow can I get the result of elastic search from java code?https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-code<p>The example: My elastic search has a document template that has a filed ABC_, can I have a chance to get the value of this field via elastic search from java code?</p>ttlinhWed, 18 Dec 2019 10:05:26 -0500https://answers.axonivy.com/questions/4288/how-can-i-get-the-result-of-elastic-search-from-java-codeelasticsearchElastic Search index recreation fails inconsistentlyhttps://answers.axonivy.com/questions/4179/elastic-search-index-recreation-fails-inconsistently<p>When re-starting the Ivy Engine (7.0.11), we found out, that elastic search index recreation fails everytime but with different objects.</p> <p>We then tried to call <code>DiCore.getGlobalInjector().getInstance(IBusinessDataManager.class).startIndexRecreation()</code> directly multiple times and almost every time a different object is reported as having problems, eg:</p> <pre><code>first call: bulk error: id=13a8e230cc9b47338d45e552678c1b10, index=ivy.businessdata-xxx.order, error={"type":"illegal_argument_exception","reason":"mapper [yyy.zzz] cannot be changed from type [float] to [long]"} next call: bulk error: id=0587301dfde5411a9caae3413ed25e7f, index=ivy.businessdata-xxx.order, error={"type":"illegal_argument_exception","reason":"mapper [yyy.zzz] cannot be changed from type [long] to [float]"} next call: bulk error: id=0271c00a7c5543c998bc81e5215e7949, index=ivy.businessdata-xxx.order, error={"type":"illegal_argument_exception","reason":"mapper [yyy.zzz] cannot be changed from type [long] to [float]"} </code></pre> <p>Please also note, that all three examples reference the same field of the same object type. How is this possible and how can we repair our index?</p> <p>TIA</p>petersThu, 21 Nov 2019 10:28:38 -0500https://answers.axonivy.com/questions/4179/elastic-search-index-recreation-fails-inconsistentlyindexbusiness-dataelasticsearchElasticsearchException index read-only if updating/storing BusinessDatahttps://answers.axonivy.com/questions/4038/elasticsearchexception-index-read-only-if-updating-storing-businessdata<p>I can not update and store my Business data and get the following exception if I do it e.g. <code>ivy.repo.save(in.myDossier)</code>:</p> <pre><code>ElasticsearchException: Elasticsearch update index of document failed because of: { "root_cause":[ { "type":"cluster_block_exception", "reason":"index [ivy.businessdata-abc] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];" } ], "type":"cluster_block_exception", "reason":"index [ivy.businessdata-abc] blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];" } </code></pre> <p>It seems that it is now forbidden to write to the Elasiticsearch index because it is read-only. Why is my index read-only? I did not do anything. It suddenly stopped working.</p>SupportIvyTeamTue, 01 Oct 2019 04:05:17 -0400https://answers.axonivy.com/questions/4038/elasticsearchexception-index-read-only-if-updating-storing-businessdatabusiness-dataelasticsearchHow to persist fields in ivy repo but not index in elastic?https://answers.axonivy.com/questions/4010/how-to-persist-fields-in-ivy-repo-but-not-index-in-elastic<p>For some projects it is interesting to store all data including files to the database so we can run such instances in docker and share the database. This way it would be possible to store the data in the business repo, even as we seen in <a href="https://answers.axonivy.com/questions/1779/how-can-i-persist-a-file-as-blob">https://answers.axonivy.com/questions/1779/how-can-i-persist-a-file-as-blob</a> it is not always efficient. But we would not need to index the base64 conent of the file in elastic. Is it possible?</p>adamfTue, 24 Sep 2019 02:58:44 -0400https://answers.axonivy.com/questions/4010/how-to-persist-fields-in-ivy-repo-but-not-index-in-elasticfilebusiness-dataelasticsearchpersistencerepositoryHow to connect kibana with Axon.ivy designer`s internal elasticsearch server?https://answers.axonivy.com/questions/3967/how-to-connect-kibana-with-axon-ivy-designer-s-internal-elasticsearch-server<p>As a developer I would like to visualize elasticsearch data generated by the Axon.Ivy Desginer. This turns out not so easy because in Designer 7.0.x and 7.3 we use elasticsearch 5.5 without the x-pack plugin, and kibana 5.5 by default comes with x-pack plugin enabled. What is the best way to connect kibana to our elasticsearch ?</p>adamfWed, 11 Sep 2019 10:25:42 -0400https://answers.axonivy.com/questions/3967/how-to-connect-kibana-with-axon-ivy-designer-s-internal-elasticsearch-serverelasticsearchGet data from database directly not via ElasticSearchhttps://answers.axonivy.com/questions/3935/get-data-from-database-directly-not-via-elasticsearch<p>Hi everyone, I have a case can not get data via ElasticSearch, I want to get data from iwa_bussiness in the database directly. Have any Ivy API to support this case?. Thank!</p>Phuoc NguyenWed, 28 Aug 2019 08:51:59 -0400https://answers.axonivy.com/questions/3935/get-data-from-database-directly-not-via-elasticsearchapielasticsearchdatabaseExecution of recreate index ElasticSearch failedhttps://answers.axonivy.com/questions/3934/execution-of-recreate-index-elasticsearch-failed<p>Hi,</p> <p>Due I trigger recreate index by Admin UI, that let an error as below</p> <pre><code>13:20:07.134 ERROR [ch.ivyteam.ivy.job.internal] [ivy immediate job pool-thread-3] [] Execution of job BusinessDataSearchIndexRecreator failed java.lang.OutOfMemoryError: Requested array size exceeds VM limit at java.lang.StringCoding.encode(StringCoding.java:350) at java.lang.String.getBytes(String.java:941) at org.apache.http.entity.StringEntity.&lt;init&gt;(StringEntity.java:70) at org.apache.http.client.entity.EntityBuilder.build(EntityBuilder.java:314) at io.searchbox.client.http.JestHttpClient.constructHttpMethod(JestHttpClient.java:184) at io.searchbox.client.http.JestHttpClient.prepareRequest(JestHttpClient.java:115) at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:64) at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:60) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.tryToExecute(JestOperation.java:45) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:36) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.execute(JestIndexSynchronizer.java:151) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.addDocuments(JestIndexSynchronizer.java:42) at ch.ivyteam.ivy.business.data.store.search.internal.ElasticBusinessDataSearchIndex.addAll(ElasticBusinessDataSearchIndex.java:20) at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndexRecreator.updateIndex(BusinessDataSearchIndexRecreator.java:70) at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndexRecreator.readDataAndUpdateIndex(BusinessDataSearchIndexRecreator.java:52) at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndexRecreator.recreateIndex(BusinessDataSearchIndexRecreator.java:34) at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndecesRecreator.recreateIndeces(BusinessDataSearchIndecesRecreator.java:80) at ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndecesRecreator.execute(BusinessDataSearchIndecesRecreator.java:50) at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:382) at ch.ivyteam.ivy.job.internal.JobManager$1.call(JobManager.java:1) at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:92) at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody0(SecurityManager.java:1362) at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext_aroundBody1$advice(SecurityManager.java:41) at ch.ivyteam.ivy.security.internal.SecurityManager.executeInContext(SecurityManager.java:1) at ch.ivyteam.util.callable.ExecutionContextContainer$ContainerExecutionContext.call(ExecutionContextContainer.java:88) at ch.ivyteam.util.callable.ExecutionContextContainer.executeInContext(ExecutionContextContainer.java:27) at ch.ivyteam.ivy.job.internal.JobManager.execute(JobManager.java:376) at ch.ivyteam.ivy.job.internal.Job.run(Job.java:56) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) </code></pre> <p>We use an external elasticsearch and the jvm.options is:</p> <pre><code>-XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -Xmx6144m -Xms6144m </code></pre> <p>Could anyone give us some hints?</p>dieuphWed, 28 Aug 2019 07:50:53 -0400https://answers.axonivy.com/questions/3934/execution-of-recreate-index-elasticsearch-failedelasticsearchElasticsearch fail because auto-conversion changes String values into Datehttps://answers.axonivy.com/questions/3903/elasticsearch-fail-because-auto-conversion-changes-string-values-into-date<p>We get an error of the Elasticsearch by saving a BusinessObject over the ivy.repo with a field of type <code>Map&lt; String,String &gt;</code>.</p> <pre><code>Elasticsearch update index of document failed because of: {"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [details.data.Value1] of different type, current_type [text], merged_type [date]"}],"type":"illegal_argument_exception","reason":"mapper [details.data.Value1] of different type, current_type [text], merged_type [date]"}</code></pre> <p>The problem ist clear. The field "details.data.Value1" is a date field and i try to store a String.</p> <p><strong>But</strong> the definition of our BusinessObject is different to that!<br> The field "data" of the "detail" object is defined as a <code>Map&lt; String,String &gt;</code>.<br> We get this error when we run the following code in an IvyScript (we used a helper class for Maps, because IvyScript is not able to handle double generics).</p> <pre><code>JobDetail detail = new JobDetail(); Helper helper = new Helper(); helper.setParam("Value1", (new Date()).toString()); detail.data = helper.getParams(); job.details.add(detail); detail = new JobDetail(); helper.setParam("Value1", "foo"); detail.data = helper.getParams(); job.details.add(detail);</code></pre> <p>Why does Elasticsearch change the given attribute to a date field, although we just fill in String values?<br> Furthermore we defined the value as a Map of Sting-String value pairs.<br> Is there a solution of this issue?</p> <p>We decided not to use JSON objects instead of our Map, because of the easy handling in further uses.</p>Adrian ImfeldWed, 31 Jul 2019 04:33:14 -0400https://answers.axonivy.com/questions/3903/elasticsearch-fail-because-auto-conversion-changes-string-values-into-datebusiness-dataelasticsearchivyscriptSolve read timeout issue while storing BusinessData in repositoryhttps://answers.axonivy.com/questions/3826/solve-read-timeout-issue-while-storing-businessdata-in-repository<p>I have deployed my cool wf-app into production several weeks ago. Now users are complaining about errors occuring on the screen. A first investigation into the logs revealed that there seems to be a connection problem with the elastic search server. I'm using the bundled elastic search server as it is shipped with the Axon.ivy Engine (7.3). Whats the issue here?</p> <p><code>Caused by: java.net.SocketTimeoutException: Read timed out</code></p> <pre><code>[errorId=16AE46D591AAA1BE, request=HTTP POST Start Processes/DepartmentHead.mod/163BB87520D405CF-f3(493708.480005.45511.1), session=524 (a.f@m.ch), task=480005, application=301, requestId=34869, executionContext=524 (a.f@m.ch), pmv=GMAA$hr_pbm_0001_pf$1, client=10.208.68.15, hd=com.axonivy.hrwf.pbm0001.components.ZurueckweisenKommentar, processElement=163BB87520D405CF-f17] Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Cannot reach Elasticsearch server at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.tryToExecute(JestOperation.java:51) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:36) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.execute(JestIndexSynchronizer.java:151) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestIndexSynchronizer.updateDocument(JestIndexSynchronizer.java:50) at ch.ivyteam.ivy.business.data.store.search.internal.ElasticBusinessDataSearchIndex.update(ElasticBusinessDataSearchIndex.java:33) at ch.ivyteam.ivy.business.data.store.internal.ElasticSystemDbPersistence.lambda$2(ElasticSystemDbPersistence.java:140) ... 174 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) at java.net.SocketInputStream.read(SocketInputStream.java:171) at java.net.SocketInputStream.read(SocketInputStream.java:141) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) ... 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:165) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)... at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:133) ... at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.tryToExecute(JestOperation.java:45) ... 183 more </code></pre>SupportIvyTeamMon, 27 May 2019 03:17:31 -0400https://answers.axonivy.com/questions/3826/solve-read-timeout-issue-while-storing-businessdata-in-repositorybusiness-dataelasticsearchElasticSearch fails to recreate index due to data Field type changehttps://answers.axonivy.com/questions/3791/elasticsearch-fails-to-recreate-index-due-to-data-field-type-change<p>We converted a field of a BusinessData object from <code>long</code> to <code>String</code>. Now we face index recreation problems after upgrading the ivy engine to a new version.</p> <pre><code>2019-05-06 15:36:36.038 ERROR [ch.ivyteam.ivy.business.data.store.search.internal.BusinessDataSearchIndecesRecreator] [ivy immediate job pool-thread-1] [executionContext=SYSTEM] Recreation of business data search index failed [errorId=16A8D5C46C63FD9B, executionContext=SYSTEM] ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Elasticsearch add documents to index failed because of: One or more of the items in the Bulk request failed, check BulkResult.getItems() for more information. bulk error: id=f08fe3d90a454be4b95a0b59785686ff, index=ivy.businessdata-com.axonivy.hrwf.vea.arbeitsvertragsaenderungencasemodel, error={"type":"illegal_argument_exception","reason":"mapper [antrag.lohnUndOderArbeitszeitaenderung.baseSalaryPtNew] cannot be changed from type [float] to [long]"} bulk error: id=b15b99eb022b4e1f95cd1b34ee03ae2f, index=ivy.businessdata-com.axonivy.hrwf.vea.arbeitsvertragsaenderungencasemodel, error={"type":"mapper_parsing_exception","reason":"failed to parse [antrag.lohnUndOderArbeitszeitaenderung.expensesPtCurrent]","caused_by":{"type":"number_format_exception","reason":"For input string: \"CHF500\""}} </code></pre> <p>How can we get a proper data store and make the index recreation running?</p>SupportIvyTeamTue, 07 May 2019 04:23:23 -0400https://answers.axonivy.com/questions/3791/elasticsearch-fails-to-recreate-index-due-to-data-field-type-changebusiness-dataelasticsearchHow do I change Elastic Search setting index.max_result_window?https://answers.axonivy.com/questions/3696/how-do-i-change-elastic-search-setting-index-max_result_window<p>For a migration, I need to work with a large set of Elastic Search objects. Setting the limit to 100000, I get the following error:</p> <p>ElasticsearchException: Elasticsearch search documents failed because of: {"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [100000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}],...</p> <p>How can the <strong>index.max_result_window</strong> setting be changed. Or - alternatively, how do I access the scroll API?</p> <p>Designer 7.2.1</p> <p>TIA Peter</p>petersMon, 25 Feb 2019 11:17:31 -0500https://answers.axonivy.com/questions/3696/how-do-i-change-elastic-search-setting-index-max_result_windowelasticsearchThere is a 1-second latency between ivy.repo.save(object) and ivy.repo.search(Object.class)https://answers.axonivy.com/questions/3681/there-is-a-1-second-latency-between-ivy-repo-save-object-and-ivy-repo-search-object-class<p>Hi Axon.ivy Team,</p> <p>Given the snippet of code:</p> <pre><code>Person p = new Person(); p.id = UUID.randomUUID().toString(); p.name = "John Doe"; p.birthdate = LocalDate.now(); ivy.repo.save(p); Object result = ivy.repo.search(Person.class) .textField("id").containsPhrase(p.id) .execute().getFirst(); ivy.log.error("HHH - it is null " + #result); Thread.sleep(TimeUnit.SECONDS.toMillis(1)); result = ivy.repo.search(Person.class) .textField("id").containsPhrase(p.id) .execute().getFirst(); ivy.log.error("HHH - it is null " + #result); </code></pre> <p>I found that there was a <em>1-second</em> latency between the call to <code>ivy.repo.save()</code> and <code>ivy.repo.search()</code>. This is super annoying because we had to wait for <em>1-second</em> every time until the saved object can be searched via the API. Blocking the execution for 1-second to wait until it is indexed to ES <em>every</em> <em>time</em> we save the object into the <code>BusinessDataRepository</code> is a terrible hack.</p> <p>Is it by design? Can this be fixed so that the two calls work?</p> <blockquote> <p>P.S: Please don't advise me to use the returned BusinessData id because it doesn't address my issue. I want to <em>search</em> back the data I save based on the object's field, not fetching it again.</p> <p>P.P.S: Tested with Axon.ivy Designer 7.2.1 on my local workstation.</p> </blockquote> <p><strong>UPDATE</strong></p> <p><em>25.2.2019</em>:</p> <p>In our project, we were able to develop RESTful API for other parties. As we already have persisted our objects (for example <code>Dossier</code>), in <code>BusinessDataRespository</code>, we would want to preserve that behavior.</p> <p>An excerpt from of our OpenAPI spec:</p> <pre><code>paths: /dossiers/{dossier_id}/persons/: post: operationId: addPersonToDossier description: add a single person into an existing Dossier requestbody: 'application/json': schema: $ref: '#/components/schemas/Person' responses: '201': get: operationId: getAllPersonsInDossier description: get *all* existing persons of an existing Dossier responses: '200': content: 'application/json': schema: type: array items: $ref: '#/components/schemas/Person' </code></pre> <p>From our client, after they have already invoked several calls to <code>addPersonToDossier</code>, they may want to invoke <code>getAllPersonsInDossier</code> to fetch all <code>Person</code>s of a <code>Dossier</code>. </p> <p>We persists <code>Person</code> separately from our <code>Dossier</code> to avoid <code>ConcurrentModificationException</code>, each <code>Person</code> holds a reference to its <code>Dossier</code>. Now in order to implement <code>getAllPersonsInDossier</code>, we have to use <code>Ivy.repo().search(..)</code>.</p> <p>Unfortunately, due to the 1-second latency, calling <code>getAllPersonsInDossier</code> too soon will probably return an empty result. This forces us to either:</p> <ul> <li>Require our clients to WAIT on their side for <em>1-second</em> until they can call <code>getAllPersonsInDossier</code>.</li> <li>On the server side, we somehow have to implement a <code>while</code> loop to check until the <code>Person</code> could be found via search API, then we consider the <code>addPersonToDossier</code> finishes (or worse, a <code>Thread.sleep(1000)</code>).</li> </ul> <p>Jack</p>vagabondFri, 22 Feb 2019 01:16:25 -0500https://answers.axonivy.com/questions/3681/there-is-a-1-second-latency-between-ivy-repo-save-object-and-ivy-repo-search-object-classbusiness-dataelasticsearchrepositoryIndex elasticsearch for specific typehttps://answers.axonivy.com/questions/3590/index-elasticsearch-for-specific-type<p>Hi ivyteam</p> <p>As i know when Ivy start, it will reindex everything from it's DB to ES index. </p> <p>Now i only want to index a specific type of class with:</p> <pre><code>List&lt;String&gt; reindexTypes = ... DiCore.getGlobalInjector().getInstance(IBusinessDataManager.class).startIndexRecreation(reindexTypes ); </code></pre> <p>Is it a correct way to go?</p> <p>Thanks</p>trungdvTue, 18 Dec 2018 05:45:32 -0500https://answers.axonivy.com/questions/3590/index-elasticsearch-for-specific-typeindexelasticsearchHow to keep new setting of Elasticsearch when restarting Ivy serverhttps://answers.axonivy.com/questions/3564/how-to-keep-new-setting-of-elasticsearch-when-restarting-ivy-server<p>Hello all,</p> <p>Our team want to add new setting to Elasticsearch in order to support to search special characters.</p> <p><code>curl -XPUT <a href="http://localhost:9200/ivy.businessdata-ch.axonivy.fintech.valiant.datamodel.valiantcrdhwaydossier">http://localhost:9200/ivy.businessdata-ch.axonivy.fintech.valiant.datamodel.valiantcrdhwaydossier</a> -H 'Content-Type: application/json' -d '{ "settings": { "analysis": { "char_filter": { "my_char_filter": { "type": "mapping", "mappings": [ "â =&gt; a", "ê =&gt; e", "à =&gt; a", "ï =&gt; i", "û =&gt; u", "é =&gt; e", "è =&gt; e", "ë =&gt; e", "ô =&gt; o", "î =&gt; i", "ÿ =&gt; y", "ù =&gt; u", "ç =&gt; c", "æ =&gt; ae", "œ =&gt; oe", "ü =&gt; ue" ] }, "number_filter": { "type": "mapping", "mappings": [ ". =&gt; ", "- =&gt; " ] } }, "analyzer":....</code> But when restart Ivy server, new setting is gone. We also put new setting to template as this post (<a href="https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch)">https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch)</a> with following steps: </p> <p>1) Stop Ivy server. 2) Put new setting to template. 3) Restart Ivy server. But new setting is also lost. </p> <p>To pass over this issue, we <strong>MUST delete all data in database of this index</strong>, then put new setting and restart Ivy server. </p> <p>Could you please tell me the way to go over this issue without deleting data? (Because we cannot delete data of customer).</p> <p>We are using Ivy7.0.3 and External ElasticSearch 5.5 and Oracle database.</p> <p>Thanks, Tuan</p>pptuanThu, 29 Nov 2018 03:04:56 -0500https://answers.axonivy.com/questions/3564/how-to-keep-new-setting-of-elasticsearch-when-restarting-ivy-serverelasticsearchChanging port of elasticsearchhttps://answers.axonivy.com/questions/3212/changing-port-of-elasticsearch<p>Hi everyone,</p> <p>May I ask how can we change the port of elasticsearch of Ivy Engine? I change the <code>http.port</code> attribute inside <code>elasticsearch.yml</code> but it doesn't help. </p> <p>I'm wondering if I'm missing anything here.</p>ToanLCWed, 18 Apr 2018 08:33:02 -0400https://answers.axonivy.com/questions/3212/changing-port-of-elasticsearchelasticsearchLimit 1000 fields while persisting with elasticsearchhttps://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearch<p>Hi guys,</p> <p>Recently we got into some problem while trying to save an object with more than 1000 fields. I saw that it was reported to ivy.team and the bug is in progress. </p> <p>But may I ask if there is any work around for the moment? or will not take another migration?</p> <p>Thank you very much</p> <p><code>Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Elasticsearch update index of document failed because of: {"root_cause":[{"type":"illegal_argument_exception","reason":"Limit of total fields [1000] in index [ivy.businessdata-ch.axonivy.finform.deskpost.individualdossier] has been exceeded"}],"type":"illegal_argument_exception","reason":"Limit of total fields [1000] in index [ivy.businessdata-ch.axonivy.finform.deskpost.individualdossier] has been exceeded"}</code></p>ToanLCTue, 17 Apr 2018 02:57:18 -0400https://answers.axonivy.com/questions/3194/limit-1000-fields-while-persisting-with-elasticsearchelasticsearchMultiple ElasticSearch on same machine (multiple ivy engines)https://answers.axonivy.com/questions/3126/multiple-elasticsearch-on-same-machine-multiple-ivy-engines<p>Hi ivyteam</p> <p>My team has a server which has 3 instances of Ivy engine on it. Sometime when we restart engine, it cause issue that "ES can not be started. Connection refused"</p> <p>As far as i know on each engine it sill contain one ES and it will be started when engine is started. By default, ES will take port <code>9200</code> or <code>19200</code> on <code>localhost</code> (Reference link <a href="https://developer.axonivy.com/doc/latest/EngineGuideHtml/installation.html#installation.elasticsearch">https://developer.axonivy.com/doc/latest/EngineGuideHtml/installation.html#installation.elasticsearch</a> )</p> <p>So is there any cases that the port is conflicted in my situation? If so, how can we configure the port for many instance of Ivy engine? We're using Amazon cloud so it's not a good way to buy different server for each Engine on cloud.</p> <p>Thanks</p>trungdvFri, 09 Mar 2018 01:48:49 -0500https://answers.axonivy.com/questions/3126/multiple-elasticsearch-on-same-machine-multiple-ivy-enginesengineelasticsearchCan not connect to Elasticsearch serverhttps://answers.axonivy.com/questions/2831/can-not-connect-to-elasticsearch-server<p>hi all</p> <p>I'm using Axon ivy 6.3 on Linux server. Sometime i get this exception (after deployment somehow):</p> <pre><code> Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Cannot reach Elasticsearch server at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:44) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestSearcher.search(JestSearcher.java:32) at ch.ivyteam.ivy.business.data.store.search.internal.ResultImpl.execute(ResultImpl.java:36) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.raw(QueryImpl.java:135) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.executeQuery(QueryImpl.java:179) at ch.ivyteam.ivy.business.data.store.search.internal.ExecutorImpl.execute(ExecutorImpl.java:18) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.execute(QueryImpl.java:115) at ch.axonivy.fintech.standard.dossier.DossierIdGenerator.initializeSeed(DossierIdGenerator.java:64) at ch.axonivy.fintech.standard.dossier.DossierIdGenerator.nextId(DossierIdGenerator.java:43) at ch.axonivy.fintech.abs.dossier.AbsDossierService.generateCobId(AbsDossierService.java:57) at sun.reflect.GeneratedMethodAccessor9141.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at ch.ivyteam.ivy.scripting.internal.types.IvyJavaMethod.invokeImpl(IvyJavaMethod.java:73) ... 211 more Caused by: io.searchbox.client.config.exception.CouldNotConnectException: Could not connect to <a href="http://localhost:19200">http://localhost:19200</a> at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:59) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:37) ... 224 more Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:19200 [localhost/127.0.0.1] failed: Connection refused at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:158) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at io.searchbox.client.http.JestHttpClient.executeRequest(JestHttpClient.java:109) at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:56) ... 225 more Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141) ... 236 more </code></pre> <p>After restarting server, it's seem to work again.</p> <p>The exception is clear but we don't know rootcause yet. Does anyone get same issue? and do you have any hints for it?</p> <p>Updated: i have deployed several ivy engine on same physical server, i think there is some instance of elasticservers as well. Could it be a confliction there?</p> <p>Thanks in advance</p>trungdvTue, 29 Aug 2017 03:47:58 -0400https://answers.axonivy.com/questions/2831/can-not-connect-to-elasticsearch-serveraxonivy6.3elasticsearchrepositoryHow to display the ElasticSearch schema of my BusinessDatahttps://answers.axonivy.com/questions/2769/how-to-display-the-elasticsearch-schema-of-my-businessdata<p>I'd like to analyze the BusinessData index created by ElasticSearch. How can I inspect the schema of my BusinessData within the Designer or Engine?</p>SupportIvyTeamTue, 18 Jul 2017 03:28:33 -0400https://answers.axonivy.com/questions/2769/how-to-display-the-elasticsearch-schema-of-my-businessdatabusiness-dataelasticsearchException when querying business data with sortinghttps://answers.axonivy.com/questions/2763/exception-when-querying-business-data-with-sorting<p>Hi ivyTeam</p> <p>Querying data from business data </p> <pre><code>repo().search(getType()).orderBy().textField("processName").ascending().execute().getAll(); </code></pre> <p>It throws the exception:</p> <pre><code>Caused by: ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.ElasticsearchException: Elasticsearch search documents failed because of: {"root_cause":[{"type":"search_parse_exception","reason":"No mapping found for [processName.ascii] in order to sort on"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"ivy.businessdata","node":"swxYYakvQMCJMMyVDyQhfA","reason":{"type":"search_parse_exception","reason":"No mapping found for [processName.ascii] in order to sort on"}}]} at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.checkStatusAndThrow(JestOperation.java:62) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestOperation.execute(JestOperation.java:40) at ch.ivyteam.ivy.business.data.store.search.internal.elasticsearch.JestSearcher.search(JestSearcher.java:32) at ch.ivyteam.ivy.business.data.store.search.internal.ResultImpl.execute(ResultImpl.java:38) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.raw(QueryImpl.java:128) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.executeQuery(QueryImpl.java:174) at ch.ivyteam.ivy.business.data.store.search.internal.QueryImpl.execute(QueryImpl.java:107) at ch.ivyteam.ivy.business.data.store.search.internal.OrderByFieldOrLimitImpl.execute(OrderByFieldOrLimitImpl.java:29) at ch.ivy.addon.portalkit.service.ExpressProcessService.findAllOrderByName(ExpressProcessService.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at ch.ivyteam.ivy.scripting.internal.types.IvyJavaMethod.invokeImpl(IvyJavaMethod.java:73) ... 280 more </code></pre> <p>It happens on Axon.ivy Engine RC-6.6.2.55064. In designer, sometimes it happens as well. Could you please guide us how to fix the problem?</p>lttungMon, 17 Jul 2017 05:43:16 -0400https://answers.axonivy.com/questions/2763/exception-when-querying-business-data-with-sortingbusiness-dataelasticsearchHow to upgrade elasticsearch engine on designer?https://answers.axonivy.com/questions/2713/how-to-upgrade-elasticsearch-engine-on-designer<p>Hi ivyteam</p> <p>Currently i use Axonivy 6.3 and it embed elasticsearch with version 2.3.4, it's quite old version so i want to upgrade to new version in order to apply new api or module being supported by elasticsearch (kibana/xpack,...) On server i can configure the setting in system property, but how can i do it on designer? </p> <p>Thanks</p>trungdvTue, 27 Jun 2017 05:19:14 -0400https://answers.axonivy.com/questions/2713/how-to-upgrade-elasticsearch-engine-on-designerelasticsearchrepository