yuuvis® RAD Q&A

0 votes
by (660 points)

Hi OS Team,

is it possible to change the default behaviour of ES?
I want to aggregate over a string field but this is not possible with current settings:

Fielddata is disabled on text fields by default. Set fielddata=true on [str_XXX_XXX]

Another question which is quite interesting..
for your internal search you already do such an aggregation:
--> i can get buckets for each value of this string field (but limited to ten like mentioned in another question)
Would be quite interesting which ES API Call (especially the body) you trigger if your internal search-service is invoked...

Many Thx & Rgds
Martin

1 Answer

0 votes
by (1.2k points)

Hi Martin,

it’s not necessary. You can use our Query for aggregations too. For instance,

{

"aggs": {
	"customer.name": {
	},
	"customer.city": {
	}
}	

}

Best regards
Irina

by (660 points)
HI Irina,

many thx.. sure, this works as expected.. but with in your Query it is currently not possible to add metrics to the generated buckets, or?
I tried to get buckets with several metrics directly via ES Query, this works quite well but i could not get the buckets for the mentioned text field...

Would be great if you could give me little bit more details which method you use to get the buckets of text fields for your Query (i guess you also have to deal with same issues (fielddata ...) as we do.. :-) )

Many thx and Rgds
Martin
by (1.2k points)
Hi Martin,

our String fields are multifields, they have special fields for search, sorting, aggregations etc. You should use for aggregations raw- fields, for example:

str_customer_name.raw, str_customer_city.raw etc.

Best regards
Irina
...