# Matrix stats on string fields

**URL:** <https://discuss.elastic.co/t/matrix-stats-on-string-fields/52877>\
**Category:** Elasticsearch\
**Created:** [June 15, 2016, 2:25pm UTC](https://discuss.elastic.co/t/matrix-stats-on-string-fields/52877 "2016-06-15T14:25:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dominik\_Stadler](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@Dominik\_Stadler](https://discuss.elastic.co/u/Dominik_Stadler)\
**Post date:** [June 15, 2016, 2:25pm UTC](https://discuss.elastic.co/t/matrix-stats-on-string-fields/52877/1 "2016-06-15T14:25:55Z")

</div>

Hi,

I read up and played a bit with the new Matrix Stats aggregation that was committed to master recently. It is a nice addition for a number of use-cases and works quite well for numeric values.

What I am wondering now is if there is a way to apply the same concept on string fields. As an example if you have log-entries that contain the type of browser and the operating system where they originated, there will usually be a high correlation of mobile browsers to mobile operating systems.

Is there a way I can run queries that will allow me to find such statistical correlations?

I can probably use some machine learning tools like Mahout, but it would be nice being able to use only Elasticsearch for this.

Thanks... Dominik.

---

<div class="post-metadata">

**Author:** ![nknize](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@nknize](https://discuss.elastic.co/u/nknize)\
**Post date:** [June 27, 2016, 1:45pm UTC](https://discuss.elastic.co/t/matrix-stats-on-string-fields/52877/2 "2016-06-27T13:45:01Z")

</div>

Unfortunately Matrix stats is limited to numeric fields at the moment. Adding support for String fields is something we're still considering.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:40pm UTC](https://discuss.elastic.co/t/matrix-stats-on-string-fields/52877/3 "2017-07-05T22:40:13Z")

</div>


