I am trying to search inside a space. I have few documents in it, some are uploaded through UI(using "add content" link) and some are added using API with following code
Node contentNode = HomePage.addNode("m8:xml", "cm:content");
contentNode.setProperty("cm:name", "weather.xml");
contentNode.setProperty("cm:description", "");
contentNode.setProperty("cm:title", "XMLWeather");
ClassPathResource resource = new ClassPathResource("org/alfresco/sample/jcr/weather.xml");
contentNode.setProperty("cm:content", resource.getInputStream());
The query I am using is
"PATH:\"/app:*/m8:*//*\" +TEXT:\"Hello\"";
(StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore"); )
All the documents have this keyword but this query returns me only the documents uploaded through UI and not the ones pushed through API.
Someone please help me in figuring out what is the problem.