cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene search inconsistency

pjain1
Champ in-the-making
Champ in-the-making
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.
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

Indexing content (of type d:content) may be done in the background if conversion to text is going to take too long. Too long is defined in repositiory.properties. You can change this to give atomic indexing of content if that is what you want.

It may be your content has not yet been indexed.

Can you find it by the metadata?

Andy