0
1

Hi ivyTeam

Querying data from business data

repo().search(getType()).orderBy().textField("processName").ascending().execute().getAll();

It throws the exception:

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

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?

asked 17.07.2017 at 05:43

lttung's gravatar image

lttung
(suspended)
accept rate: 40%

For the question about the schema on the engine: please see the extracted question here http://answers.axonivy.com/questions/2769/how-to-display-the-elasticsearch-schema-of-my-businessdata

(18.07.2017 at 03:49) Reguel Werme... ♦♦ Reguel%20Wermelinger's gravatar image

Axon.ivy >= 6.7

This issue has been fixed with the Axon.ivy version >= 6.7. See issue XIVY-2042 Business Data Sorting fails on a field for which no data exists

Before Axon.ivy 6.7

As a workaround add a simple BusinessData existence check query before you do the real query.

long totalCount = BusinessDataRepository.get().search(MyBusinessData.class).execute().totalCount();
if (totalCount > 0)
{
 //you query here...
}
link

answered 18.07.2017 at 03:04

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
accept rate: 70%

edited 24.07.2017 at 05:22

Flavio%20Sadeghi's gravatar image

Flavio Sadeghi ♦♦
(suspended)

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×22
×17

Asked: 17.07.2017 at 05:43

Seen: 2,134 times

Last updated: 24.07.2017 at 05:23