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

Null field queries are converted into generic string queries #58

Open
youeyoue opened this issue Jun 27, 2016 · 0 comments
Open

Null field queries are converted into generic string queries #58

youeyoue opened this issue Jun 27, 2016 · 0 comments

Comments

@youeyoue
Copy link

  • Sometimes a node won't have the report-timestamp field set yet (same can be applied to other fields).

I haven't been able to figure out how to directly search for a field that is null.

If I do the following search:

#node.report-timestamp = null

The following query is ran:

/v4/nodes?include-total=true&limit=50&offset=0&order-by=%5B%7B%22field%22:%22certname%22,%22order%22:%22asc%22%7D%5D&query=%5B%22in%22,%22certname%22,%5B%22extract%22,%22certname%22,%5B%22select-nodes%22,%5B%22%3D%22,%22report-timestamp%22,%22null%22%5D%5D%5D%5D

This has "null" wrapped in quotes: %22null%22

However, if you remove the quotes and manually execute the query, you will get a JSON object with results as expected.

/v4/nodes?include-total=true&limit=50&offset=0&order-by=%5B%7B%22field%22:%22certname%22,%22order%22:%22asc%22%7D%5D&query=%5B%22in%22,%22certname%22,%5B%22extract%22,%22certname%22,%5B%22select-nodes%22,%5B%22%3D%22,%22report-timestamp%22,null%5D%5D%5D%5D

This seems to indicate that null fields aren't supported. Or that it's not obvious.

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

1 participant