i am trying to search for documents on an extended metadata for the document ojbect.
the document object has a EXT::A metadata and the EXT::A is made of two fields, EXT::NAME and EXT::NAMEID
i tried the following code but it throws a FIELD IS NULL error.
SearchArgument searchArgument = new SearchArgument();
searchArgument.setProfileCondition("EXT::A.EXT::NAMEID like \"%sp1%\"");
// Set the number of items returned as a result of the search.
searchArgument.setItemsToReturn(new Integer(20));
// Construct the SearchReturnedItem for Item properties.
SearchArgument.SearchReturnedItem[] searchReturnedItems =
new SearchArgument.SearchReturnedItem[1];
// Set which properties will be filled in the return Item.
String[] properties = new String[3];
properties[0] = "BASE::CREATED_TIME";
properties[1] = "BASE:

ESCRIPTION";
properties[2] = "BASE::NAME";
// Set the SearchReturnedItem[] element to return Document items.
searchReturnedItems [0] =
new SearchArgument.SearchReturnedItem(Document.class,
properties);
// Set the SearchArgument SearchReturnedItem elements.
searchArgument.setReturnedItems(searchReturnedItems);
// Execute the search.
Collection results = facility.searchWorkspaces(searchArgument); //exception here-
// Iterate the results, displaying the properties.
Iterator iter = results.iterator();
SearchResult result = null;
if(results.size() == 0) System.out.println("Nothing");
while(iter.hasNext())
{
result = (SearchResult)iter.next();
Document document = (Document)result.getItem();
System.out.println("The Name is: " + document.getName());
System.out.println("The description is: " + document.getDescription());
System.out.println("The CreatedDate is: " + document.getCreatedDate());
}
any help is appreciated.