1
votes

I am executing a lucene search to look for documents with a particular category. My category hierarchy is like this: Root category: - Company Documents - GAW

After referring to the search API Alfresco documentation, I tried the following queries:

+PATH:\"//cm:GAW//*"

+PATH:\"/cm:generalclassifiable//cm:GAW//*"

+PATH:\"/cm:generalclassifiable//cm:GAW/member"

+PATH:\"/cm:generalclassifiable//cm:GAW//member"

But the document is not found. I am running a JavaScript for the search. These documents are located in sub-folders with deep folder levels but have category as "GAW". Can anyone help me in pointing to the right syntax?

What would be the syntax to search by folders. It is located within a sub-folder GAW inside document library of a site.

Thanks!

1
what type of analyzer is used for indexing the PATH field ? Also, the colon : character is a special character in the lucene query syntax - omu_negru
Hi @omu_negru I am using the default analyzer which comes with Alfresco share. - jcoder12

1 Answers

0
votes

Disclaimer: I am very new to Alfresco and my only experience is with 3.3.

My category hierarchy is like this: Root category: - Company Documents - GAW

From this description, I think you are using the wrong path in your examples. You can find out the full path (called the Primary Path in 3.3) from the Administration Console. I suspect it will look like this:

/cm:categoryRoot/cm:generalclassifiable/cm:Company Documents/cm:GAW

Using that in your query might give you items that have been categorised with GAW;

PATH:\"cm:generalclassifiable/cm:Company Documents/cm:GAW/member\"