AnsweredAssumed Answered

Lucene search

Question asked by pjain on Oct 2, 2007
Latest reply on Oct 16, 2007 by andy
I am trying to search for documents with particular keyword. I tried xpath but it would search only in the document names and not content. I tried Lucene but it would just return the node path and not the actual documents that contain the keywords.
Following are the queries for both that I am using.

Workspace workspace = session.getWorkspace();
QueryManager queryManager = workspace.getQueryManager();
Query query = queryManager.createQuery("//app:company_home/m8:HomePage/*[contains('weather')]", Query.XPATH);

SearchParameters searchParameters = new SearchParameters();
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");

String query = "PATH:\"/app:*/m8:*//*\" +TEXT:\"TWENTYFOURHRPRECIP\"";