cancel
Showing results for 
Search instead for 
Did you mean: 

Search content nodes to particluar space and category

shanmugaraja
Champ in-the-making
Champ in-the-making
I have a scenario, I want to get the content nodes to specific space and the a spceific category in the single search call.

Is it possible to have lucene search query like this

"PATH:\"/cm:generalclassifiable/cm:mycategory/member\"" AND
"PATH:\"/cm:generalclassifiable/cm:space"

is there any simliar tag like "cm:generalclassifiable" for searching space available?

Any help is appriciated.  I need urgent response.  Thanks in advance
1 REPLY 1

sdavis
Champ in-the-making
Champ in-the-making
var baseInstitute = "//cm:CICU-SUNY-Portal/cm:Institutions/cm:";
var sunyInstitute = "";
var sunyIndustry = "";

   // Use a PATH construct to zero in on specific folders.  The top container is defined in baseInstitute (maps to a space)
   // Also, since these flatten to XML names we need to conform to ISO 9075.  Line below translates all
   // spaces to '_x0020_'
   var encoded_sunyInstitute = baseInstitute + sunyInstitute.replace(/ /g, "_x0020_") + "/*";
   var query = "+PATH: \"" + encoded_sunyInstitute + "\"";

   // Combine multiple criteria by appending the query string.  The next segment here simply adds a
   // keyword requirement in addition to the above folder selection.  For more syntax options and parameters,
   // look at http://wiki.alfresco.com/wiki/Search
   query += " +TEXT: \"" + sunyIndustry + "\"";

   var nodes = search.luceneSearch(query);
   model.resultset = nodes;
   model.query = query;
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.