CQL query: Geoserver 2.5.2 CQL BBOX filter - cql

Trying to use CQL bounding box filter, but get a strange result like this:
loadFeatures({"type":"FeatureCollection","totalFeatures":15640,"features":[]})
as it is 15640 features in that bbox, but why there are no list of them and features are just empty list.
my request is following:
http://loom-gis.geo.ut.ee:8080/geoserver/ermas/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=ermas:testdata_geopnt&outputFormat=text/javascript&format_options=callback:loadFeatures&maxFeatures=50&srsname=EPSG:3301&EPSG:3301&CQL_FILTER=%28BBOX%28geometry,494981.10875,%206437855.3625,%20684824.8587499999,%206569105.3625%29%29

try wfs version 1.0.0
this request :
http://loom-gis.geo.ut.ee:8080/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ermas:testdata_geopnt&srsname=EPSG:3301&outputFormat=text/javascript&format_options=callback:loadFeatures&CQL_FILTER=%28BBOX%28geometry,494981.10875,%206437855.3625,%20684824.8587499999,%206569105.3625%29%29

Related

Thingsboard 3.4 - Trip Animation Map using Latest Values and Attributes in path-color-function

I'm trying to use Attributes of devices in path-color function.
Thi is my Data Configuration
In the path-color function , I can't access the attributes values , I see the Timeseries , I see the latest values keys in the datasource , but no data.
Did anyone have success on this?
Thanks
Corrado

Spark-Solr Connector trying to add already existing field with stored=true

I am using Spark-Solr connector 3.4.0 with Solr cloud version 7.6.0 in a Spark 2.2.1 Cluster . We have an existing Solr collection with a predefined schema for it. Most of the fields have the stored parameter set to true, but there are certain fields where we explicitly set stored=false. When we try to push data to Solr using the spark-solr connector, we get the following error-
org.apache.solr.api.ApiBag$ExceptionWithErrObject: error processing commands, errors: [{add-field={name=taxonomy, indexed=true, multiValued=true, docValues=true, stored=true, type=string}, errorMessages=[Field 'item_id_channel' already exists.
]}],
at org.apache.solr.handler.SchemaHandler.handleRequestBody(SchemaHandler.java:92)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2541)
at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
The error says the item_id_channel already exists, but this error is only raised for fields for which we have defined stored=false (in the Solr schema). I get that the connector wishes to create the schema again for some reason, but it sets the stored parameter to true which clashes with the predefined schema definition on Solr for this field.
My question is - Is there a way to tell the connector (probably through some option?) that we want the stored to be set to true for certain fields? And probably a generic way to define other solr parameters for the fields?
We found the issue that was causing the error. There was a bug in older versions of spark-solr connector, because of which the connector was trying to add existing fields to the solr schema in case the value of stored was true. This was fixed in 3.5.5 release. Hence, once we upgraded our connector to version 3.5.14, the ingestion stared working without any errors.

orientjs: query result Bag.all() returns empty array

Im using OrientJS with nodeJS to perform a query using .query() method.
I get results, but I cant extract the in_ and out_ fields, as they`re of a 'Bag' type.
When I try .all() method to get the results I get an array[0].
When I perform the same query in Studio I see that the in_ and out_ fields are not empty.
Our edges are tree based, and tree based ridbags are not currently supported by OrientJs as can be seen here. This is why we did not get any results.
Embedded RIDbags are supported.

Extract facets based on tags in Query Builder

I am trying to extract the facets using Query builder in AEM. My query is as below:
1_group.p.or=true
1_group.1_type=cq:Page
1_group.2_type=dam:Asset
2_group.p.or=true
2_group.1_path=/content
2_group.2_path=/content/dam
3_group.p.or=true
3_group.1_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.1_tagid.property=#jcr:content/cq:tags
3_group.2_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.2_tagid.property=#jcr:content/metadata/cq:tags
fulltext=text
p.limit=-1
The Query Builder returns the facets based on the type (cq:page, dam:Asset) for the above query, but I need the facets based on the tags. Is there any way, I can explicitly provide the parameter on which the facets are required. Also, please suggest if we can optimize this query to achieve the same.
Thanks,
Shailesh
This issue is fixed now. The mistake was in the tagid.property predicate. It should not start with #.
1_group.p.or=true
1_group.1_type=cq:Page
1_group.2_type=dam:Asset
2_group.p.or=true
2_group.1_path=/content
2_group.2_path=/content/dam
3_group.p.or=true
3_group.1_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.1_tagid.property=jcr:content/cq:tags
3_group.2_tagid=/etc/tags/geometrixx-outdoors/activity/biking
3_group.2_tagid.property=jcr:content/metadata/cq:tags
fulltext=text
p.limit=-1

get latest version of all articles with pagination

i would like to get the latest version of all journal articles.
I have a strong requirement on performances issue.
I came up with a very fast query:
SELECT
articleId,
MAX(version) as currentVersion
FROM mf3_liferay.journalarticle
GROUP BY articleId
HAVING currentVersion;
I tough about dynamic queries:
DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(JournalArticle.class);
dynamicQuery.add(RestrictionsFactoryUtil.eq("status", 0))
.addOrder(OrderFactoryUtil.desc("version"))
.setLimit(cur, cur + resultsByPage);
dynamicQuery.setProjection(ProjectionFactoryUtil.groupProperty("version"));
I cannot find a way to add the Having clause.
I read about that:
http://www.liferay.com/fr/documentation/liferay-portal/6.1/development/-/ai/developing-custom-sql-queries-liferay-portal-6-1-dev-guide-en
But I cannot get it to work and I'm worried about performances...
I suggest you use the Search engine instead of querying the database directly.
It offers better performance, and offers pagination.
Getting the latest versions (the 'current') can be done using a field filter on the field 'head', like this:
searchQuery.addRequiredTerm("head", Boolean.TRUE);

Resources