You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the alfresco/s/apix/v1/search endpoint, I would expect that when you search with an invalid property name, an error would be returned. Instead, an empty result set is returned.
This is very confusing for developers as it seems that their query was valid, and there were just no documents matching their criteria.
Tested with:
eu.xenit.apix.impl-51 1.20.0
Description:
Using the
alfresco/s/apix/v1/search
endpoint, I would expect that when you search with an invalid property name, an error would be returned. Instead, an empty result set is returned.This is very confusing for developers as it seems that their query was valid, and there were just no documents matching their criteria.
Use cases:
Normal use case (expected behaviour):
curl -u admin:passwordhere -v -XPOST -H 'Content-Type: application/json' https://demo.xenit.eu/alfresco/s/apix/v1/search -d '{"query":{"and":[{"property":{"name":"cm:name","value":"myFileName"}}]}}'
Returns:
{"noderefs":[123 nodeRefs here],"totalResultCount":123}
Non existent property use case (expected behaviour):
curl -u admin:passwordhere -v -XPOST -H 'Content-Type: application/json' https://demo.xenit.eu/alfresco/s/apix/v1/search -d '{"query":{"and":[{"property":{"name":"bogus","value":"myFileName"}}]}}'
Returns:
An error, indicating that the provided property is invalid
Non existent property use case (actual behaviour):
curl -u admin:passwordhere -v -XPOST -H 'Content-Type: application/json' https://demo.xenit.eu/alfresco/s/apix/v1/search -d '{"query":{"and":[{"property":{"name":"bogus","value":"myFileName"}}]}}'
Returns:
{"noderefs":[],"totalResultCount":0}
The text was updated successfully, but these errors were encountered: