Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different matched number if using intersects or filter in POST /search #46

Closed
seskildsen opened this issue Jun 7, 2022 · 1 comment
Closed

Comments

@seskildsen
Copy link
Contributor

seskildsen commented Jun 7, 2022

In POST /search.

If using intersects, POINT geometry, and filter to get a direction, the returned matched value is 12.

POST /search

{ "intersects": { "type": "Point", "coordinates":[ 10.4064, 55.3951 ] }, "filter-lang": "cql-json", "filter": { "and": [ {"eq": [ { "property": "direction" }, "east" ] } ] } }
Screenshot from 2022-06-07 10-31-45

But if using only filter and there specify a intersects and a direction the returned matched is 67.

POST /search
{ "filter-lang": "cql-json", "filter": { "intersects": [ { "property": "geometry" }, { "type": "Point", "coordinates": [ 10.4064, 55.3951 ] } ], "and": [ {"eq": [ { "property": "direction" }, "east" ] } ] } }
Screenshot from 2022-06-07 10-32-09

@AsgerPetersen
Copy link
Collaborator

These are not valid cql filters. The length of the array of anded items must be at least 2.

However it would be nice if the API returned an error in this case: #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants