AnsweredAssumed Answered

Rest Query Structure

Question asked by Kim Bendtsen on Sep 17, 2014

Im’ having trouble getting any reasonable query working when querying our custom metadata.

I have uploaded several documents with metadata in the format:

<?xml version="1.0"?>
<UnitTestMetadata xmlns="http://schemas.datacontract.org/2004/07/CopyService.Test.Mocks" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                 <Id>1ea7622a-8c58-4d97-b857-35de6a0b279d</Id>
                 <StringValue>dummy</StringValue>
</UnitTestMetadata>


However I’m not able to query a document with a specific id. When using the advanced search in the HCP Search Console. I get the following results:


+customMetadataContent:"UnitTestMetadata.Id.1ea7622a-8c58-4d97-b857-35de6a0b279d.ID.UnitTestMetadata"
or
+customMetadataContent:"Id.1ea7622a-8c58-4d97-b857-35de6a0b279d.Id"
or
+customMetadataContent:"stringvalue.dummy.stringvalue"
or
+customMetadataContent:"unittestmetadata.stringvalue.dummy.stringvalue.unittestmetadata"

All gives me no results


+customMetadataContent:UnitTestMetadata. Id.”1ea7622a-8c58-4d97-b857-35de6a0b279d”. Id.UnitTestMetadata
or
+customMetadataContent: Id."1ea7622a-8c58-4d97-b857-35de6a0b279d".Id

Gives me all document with metadata in the format describes above


+customMetadataContent:"1ea7622a-8c58-4d97-b857-35de6a0b279d"

Gives me the correct document, however there is no guarantee that the id is not used in other metadata, so I need to specify it to be in “UnitTestMetadata.Id”.

So what am I missing here, shouldn’t I be able to perform query specifying the value to be in the “UnitTestMetadata. Id” tag.

Outcomes