indirect document search using the REST API

I'm not sure what I'm doing wrong, I've got an object type "Contract" with then there is Contract Type which is an attribute of Contract.

If I wanted to return all of the documents where the contract type is 5 as an example, would I use something like this:

/REST/objects/0?limit=20&p1027.p1039=5

Where 0 is the document class,

1027 is the property of Contract

and Contract type's property is 1039.

This is not throwing any errors, just not returning results when I know that there are documents.