AnsweredAssumed Answered

Search on custom property not returning results

Question asked by heisenberg on Jan 9, 2014
Latest reply on Jan 17, 2014 by castgroupteam
I had modified the stock contentModel.xml by adding a custom property "mycustomprop1" to cm:content as follows:

     <type name="cm:content">
            <property name="cm:content">
               <!– Although content is marked as indexed atomically it may end up asynchronous –>
               <!– if the content conversion will take too long. Content that does not require conversion –>
               <!– to UTF8 test/plain will always be indexed atomically –>
               <index enabled="true">
            <property name="cm:mycustomprop1">
               <title>My Custom Property</title>
               <index enabled="true">

Then I proceeded to add a couple of nodes with FileFolderService, and set the property to "ZACK". But searching for the custom property fails, but if I search for the type I can see the nodes.

   SearchParameters params = new SearchParameters();
        params.setQuery("@cm\\:mycustomprop1:\"ZACK\"");  /* This returns 0 hits?!? */
        //params.setQuery("TYPE:\"cm:content\""); /* This returns the 2 nodes as expected. */
        ResultSet results = searchService.query(params);

What am I missing here? Yes, I am 100% sure I successfully added the "ZACK" property to the nodes, I verified that by reading it back with NodeService.getProperty().