Filter by String in Grafana

I am trying to filter using a metric which is in String format. My server names , 4 of those, are mentioned as S1, S2, S3 and S4 as a string in Elasticsearch. Since they are mentioned as strings, those values are not displayed in the list box for Metrics. Is there any solution for this?

Regards