[Geoserver-devel] returning extent as response for the resultant query records from microsoft sql server in geoserver

http://localhost:8080/geoserver/wfs?service=wfs&version=1.1.0&request=getfeature&typename=topp:states&CQL_FILTER=STATE_NAME=%27Idaho%27&resulttype=hits

returns 1 record as below in XML

<wfs:FeatureCollection xmlns:it.geosolutions="[http://www.geo-solutions.it](http://www.geo-solutions.it)"    xmlns:cite="[http://www.opengeospatial.net/cite](http://www.opengeospatial.net/cite)" xmlns:ogc="[http://www.opengis.net/ogc](http://www.opengis.net/ogc)" xmlns:tiger="[http://www.census.gov](http://www.census.gov)" xmlns:sde="[http://geoserver.sf.net](http://geoserver.sf.net)" xmlns:topp="[http://www.openplans.org/topp](http://www.openplans.org/topp)" xmlns:wfs="[http://www.opengis.net/wfs](http://www.opengis.net/wfs)" xmlns:ows="[http://www.opengis.net/ows](http://www.opengis.net/ows)" xmlns:xlink="[http://www.w3.org/1999/xlink](http://www.w3.org/1999/xlink)" xmlns:KFRI="[http://www.kfri.res.in/](http://www.kfri.res.in/)" xmlns:sf="[http://www.openplans.org/spearfish](http://www.openplans.org/spearfish)" xmlns:gml="[http://www.opengis.net/gml](http://www.opengis.net/gml)" xmlns:nurc="[http://www.nurc.nato.int](http://www.nurc.nato.int)" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)" numberOfFeatures="1" timeStamp="2016-08-01T11:45:42.443Z" xsi:schemaLocation="[http://www.opengis.net/wfs](http://www.opengis.net/wfs) [http://schemas.opengis.net/wfs/1.1.0/wfs.xsd](http://schemas.opengis.net/wfs/1.1.0/wfs.xsd)"/>

In addition,i need the extent also for the feature in the response. And please note that if the response returns 4 features also it should return one extent for all those 4 features instead of returning extent for each feature.

···

I have data in the GeoServer coming from Microsoft’s SQL server. I want to use CQL filter with WMS to query and get 4000k records as a result. I need to know is there any way my CQl filter with WMS can return extent for the 4k records in the resultant response?If the result is 2k records, then it should return the extent for those.For ex,