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

Support query filtering on NGSIv2 query forwarding to CPrs (registered using NGSIv1) #2282

Open
fgalan opened this issue Jun 15, 2016 · 9 comments
Labels

Comments

@fgalan
Copy link
Member

fgalan commented Jun 15, 2016

Query filtering (e.g. GET /v2/entities?q=temperature>40) is not supported on query forwarding.

  • First, Orion doesn't include the filter in the POST /v1/queryContext operation forwarded to CPr.
  • Second, Orion doesn't filter the CPr results before responding them back to client.

Edit: the answer to question at SOF at https://stackoverflow.com/questions/53044149/how-to-avoid-registrations-result-when-query-the-entities-filtered-by-a-relation/53169410#53169410 should be edited when this issue gets solved.

@fgalan fgalan added the backlog label Jun 15, 2016
@fgalan
Copy link
Member Author

fgalan commented Jun 15, 2016

Just to clarify: not only q filters (as shown in the example). Also geo-filters.

@MaxAkesson
Copy link

This bug is posing a big problem for us, is there any work-around or way for us to help out to fix this issue?

@fgalan
Copy link
Member Author

fgalan commented Oct 18, 2018

The easiest workaround is implementing the filtering at client side.

I mean, the client will receive all the results, no matter if temperature is greater than 40 or not. The client may filter out the entities which entity less than or equal 40,

@MaxAkesson
Copy link

Filtering at client side works as long as the amount of entities is not too great and the client knows filtering must be done on the results rather than the query.

We have read the proposed Context Source Forwarding Specification and saw it would fix many problems, is there a priority to implement it? Is there anything we can contribute?

@fgalan
Copy link
Member Author

fgalan commented Apr 22, 2019

We have read the proposed Context Source Forwarding Specification and saw it would fix many problems, is there a priority to implement it? Is there anything we can contribute?

A simplified version of the specification (described in this comment) is under work (in fact the first batch of functionality, corresponding to query forwarding, is on the way in PR #3467). My spectation is it will be finished in the next Orion version (2.3).

However, note this simplified version of the specification doesn't include filtering, so probably it will not suffice your case. Filtering at NGSIv2 API client side stills being a posibility.

@mkavipriya
Copy link

Do we have a fix available for this query filtering issue in Context Provider please? We are facing the same issue where Context providing returning invalid records and Orion forwarding them to the client as it is.

@fgalan
Copy link
Member Author

fgalan commented Dec 16, 2020

As far as I know, there isn't any fix available yet. The recommended workaround is to filter query results on the client side.

@ArqamFarooqui110719
Copy link
Contributor

Hi @fgalan sir, is this feature still valid?

@fgalan
Copy link
Member Author

fgalan commented Mar 7, 2023

I'd suggest look for issues not related with registration or forwarding functionality. That functionality could be deprecated in the future (it is somehow problematic) so it would be wiser to devote effort to other more productive issues.

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

No branches or pull requests

4 participants