# Unable to retrieve Elastic data by using GeoServer CQL Filters

**URL:** <https://discuss.elastic.co/t/unable-to-retrieve-elastic-data-by-using-geoserver-cql-filters/161405>\
**Category:** Elasticsearch\
**Created:** [December 18, 2018, 7:27pm UTC](https://discuss.elastic.co/t/unable-to-retrieve-elastic-data-by-using-geoserver-cql-filters/161405 "2018-12-18T19:27:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dp24](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@Dp24](https://discuss.elastic.co/u/Dp24)\
**Post date:** [December 18, 2018, 7:27pm UTC](https://discuss.elastic.co/t/unable-to-retrieve-elastic-data-by-using-geoserver-cql-filters/161405/1 "2018-12-18T19:27:41Z")

</div>

I am working in gis project. i am using elastic search plugin for GeoServer. So, I am able to access  
Elastic search data in GeoServer. I am stored GeoJSON Data in Elastic search and also create mapping for geo-shape before indexing the GeoJSON Document.  
The GeoJSON Structure would be like { "type":"Feature","properties":{"ABBREV":"Italy","NAME":"Italy",......}, "geometry":{"type":"MultiPolygon","coordinates":[values...]}}. I inserted multiple countries GeoJSON documents of same sturcture.  
I am storing this kind of data in elastic search search And I Publish the layer in GeoServer using  
ealstic search index. so, I can access the stored data through GeoServer. GeoServer providing WMS and WFS services for this data. so, I am able to retrieve this data by using WMS and WFS service. But, When I apply CQL Filters on this data based on fields , I am unable to retrieve WMS(Map) and WFS (GeoJSON format) data.  
I am using in CQL filters -\> "properties.ABBREV"='Italy' and also try with properties.ABBREV='Italy' . I am not got the GeoJSON data of Italy( wfs url) and map of Italy (WMS url).  
and also I am checking with Match query in elastic search like "properties.ABBREV":"Italy" then it showing the matched document. But, when i apply CQL Filters, it didn't work. I am searching multiple references but I am unable to get solution for this problem. Could please help on this or provide some references to solve this issue.

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [December 19, 2018, 5:06pm UTC](https://discuss.elastic.co/t/unable-to-retrieve-elastic-data-by-using-geoserver-cql-filters/161405/2 "2018-12-19T17:06:35Z")

</div>

> [@Dp24](#):
>
> I am checking with Match query in Elasticsearch like "properties.ABBREV":"Italy" then it showing the matched document.

Since it works when you are communicating with elasticsearch directly, I think it might be better to ask this question in GeoServer mailing list or IRC channel or by contacting the plugin author.

---

<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:** [January 16, 2019, 5:06pm UTC](https://discuss.elastic.co/t/unable-to-retrieve-elastic-data-by-using-geoserver-cql-filters/161405/3 "2019-01-16T17:06:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
