AnsweredAssumed Answered

Search using SearchParameter

Question asked by deepusearching on Feb 28, 2006
Latest reply on Mar 3, 2006 by davidc
Hi ,

I am facing one problem while searching the asset from Alfresco. My base code is given bellow: I took this code from

        SearchParameters sp = new SearchParameters();
        ResultSet results = null;
            results = serviceRegistry.getSearchService().query(sp);
            for(ResultSetRow row : results)
                NodeRef currentNodeRef = row.getNodeRef();
            if(results != null)

The problem is for adding a store in the search parameters. I can?t find out how to initialize the StoreRef(Reference to a store) object. We can initialize the StoreRef in two ways:
1)   StoreRef(java.lang.String string)
2)   StoreRef(java.lang.String protocol, java.lang.String identifier)
We can findout one table named store in the database. I tried different combinations to initialize the StoreRef. I searched about this in the Alfresco Forum also. But it?s not working. The search language we are going to use is XPath.

Please let me know if you got any solution on this.

With Regards,
Deepu Sebastian.