Group by String value issue

I am using Employee Name (String) in groupby matrix, groupby values get splits by while sapce.

I have name as : “Keshav Sharma”,“Ravi Kumar”

Graph shows grouping by “Keahav” , “Sharma”, “Ravi” , "Kumar"
Expected: “Keshav Sharma”,“Ravi Kumar”

I had set “fielddata”: true for this field in elasticsearch.

“type”: “text”, “fielddata”: true

if it gets split by white space it means your grouping on field that Elasticsearch has analyzed. You need to update your index mapping and set the type to keyword (in 5.x) or set it to non analyzed in ES 2.x.

If your using logstash it creates seperate fields that ends in “.raw” that are not analyzed.

I updated my index mapping and set the type to keyword in 5.x , but this dint work for us . Still it splits the string . Is there any other step to be taken.
@ankur jindal : were you able to resolve the issue ?

on elastic search modify the property of the field:
“type”: “keyword” ,
“index”: “not_analyzed”

Hope this should work for you !!

Hi,

I want to draw a pie chart with Jenkins build data which is coming in below format from ELG stack elastic search. Want to draw pie chart with aggregate value of color (red, blue, yellow) in percentage format. Unable to find correct lucene query for Grafana. Can any one help us?

{"_id":“AV2IjnAxmKC6_kxk1guy”,"_type":“logs”,"_index":“logstash-2017.07.28”,"@timestamp":[1501234622388],“jobs”:[{“color”:“blue”,“name”:“amc-bootstrap-pl”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“blue”,“name”:“archiva-demo-app”,"_class":“hudson.model.FreeStyleProject”},{“color”:“blue”,“name”:“aris-analytics-pipeline”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“blue”,“name”:“aris-core-ui”,"_class":“hudson.model.FreeStyleProject”},{“name”:“aris-core-ui-pl”,"_class":“org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject”},{“color”:“blue”,“name”:“aris-demo-app”,"_class":“hudson.model.FreeStyleProject”},{“color”:“notbuilt”,“name”:“aris-web-base-app”,"_class":“hudson.model.FreeStyleProject”},{“color”:“blue”,“name”:“aris-web-platform”,"_class":“hudson.model.FreeStyleProject”},{“color”:“red”,“name”:“aris-web-platform-backup”,"_class":“hudson.model.FreeStyleProject”},{“color”:“red”,“name”:“awa-emr-trigger”,"_class":“hudson.model.FreeStyleProject”},{“color”:“red”,“name”:“config-server-build”,"_class":“hudson.model.FreeStyleProject”},{“color”:“blue”,“name”:“DevOps_Course1”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“blue”,“name”:“Devops_course2”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“blue”,“name”:“DevOps_Sample”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“blue”,“name”:“ebiz-analytics-pipeline”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“red”,“name”:“ebiz-app-pipeline”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“yellow”,“name”:“ebiz-test”,"_class":“hudson.maven.MavenModuleSet”},{“color”:“red”,“name”:“inventory-app-pipeline”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“red”,“name”:“inventory-db-pipeline”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“red”,“name”:“inventory-test-pipeline”,"_class":“org.jenkinsci.plugins.workflow.job.WorkflowJob”},{“color”:“blue”,“name”:“inventory_app_pl_trigger”,"_class":“hudson.model.FreeStyleProject”},{“color”:“notbuilt”,“name”:“inventory_db_pl_trigger”,"_class":“hudson.model.FreeStyleProject”},{“color”:“blue”,“name”:“inventory_test_pl_trigger”,"_class":“hudson.model.FreeStyleProject”},

Elasticsearch does not have a percentage metric aggregator that I know of

Hi Torkel, Can i get the aggregate count for these string values? can you provide me sample query?

Ad a terms group, and count or sum metric