cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to match categories in lucene query

stevewickii
Champ in-the-making
Champ in-the-making
I am not having any success executing the following query with Alfresco 2.9.0B.  This worked in Alfresco 2.1.0 R1.


+PARENT:"workspace://SpacesStore/fd22314e-bb01-11dc-862f-f9940e3b6af0" +@cm\:categories:"workspace://SpacesStore/a39d7d01-7103-11dc-9a14-ed64e29c2348"

This statement, by itself +PARENT:"workspace://SpacesStore/fd22314e-bb01-11dc-862f-f9940e3b6af0" (/app:company_home/cm:FMC/cm:Content/cm:Links/cm:associations/cm:National) returns 1 document, workspace://SpacesStore/1402dc7d-bade-11dc-862f-f9940e3b6af0 (/app:company_home/cm:FMC/cm:Content/cm:Links/cm:associations/cm:National/cm:National Association of Independent Crop Consultants), in the Node Browser, as expected.  Adding the @cm\:categories returns 0 documents in the node browser.  I verified with the node browser that workspace://SpacesStore/a39d7d01-7103-11dc-9a14-ed64e29c2348 (/cm:generalclassifiable/cm:Audience/cm:Consultants) is in the categories property of the document workspace://SpacesStore/1402dc7d-bade-11dc-862f-f9940e3b6af0 under the parent workspace://SpacesStore/fd22314e-bb01-11dc-862f-f9940e3b6af0.

Can anyone help me get this working again?
4 REPLIES 4

rivarola
Champ on-the-rise
Champ on-the-rise
Hello,

Couldn't you use the PATH query to get the document classified by the category  instead of NodeRef value in the property ? Usually to find document against categories we use queries like PATH:"/cm:generalclassifiable/cm:Languages/cm:French/*"

stevewickii
Champ in-the-making
Champ in-the-making
It takes 35 seconds to execute the query using PATH method with categories.

stevewickii
Champ in-the-making
Champ in-the-making
This query executes in Alfresco 2.1.0 R1 in less than 1 second and returns 1 document.  The same query returns 0 documents in Alfresco 2.9.0B running on a copy of the 2.1.0 database and dir.root.
+PATH:"/app:company_home/cm:FMC/cm:Content/cm:Links/cm:associations/cm:National/*" AND @cm\:categories:"workspace://SpacesStore/a39d7d01-7103-11dc-9a14-ed64e29c2348"

stevewickii
Champ in-the-making
Champ in-the-making
Searching by the categories property actually works in Alfresco 2.9.0B, it just isn't matching categories properties in my existing content.

When I add new content, and assign the category Audience/Consultants to the content, the following query returns the new piece of content very quickly.

+PATH:"/app:company_home/cm:FMC/*" AND @cm\:categories:"workspace://SpacesStore/a39d7d01-7103-11dc-9a14-ed64e29c2348"

workspace://SpacesStore/a39d7d01-7103-11dc-9a14-ed64e29c2348 is the node reference for the category Audience/Consultants.

When I execute the following query, i see 5 documents, and each of them has workspace://SpacesStore/a39d7d01-7103-11dc-9a14-ed64e29c2348 in the categories property.
+PATH:"/app:company_home/cm:FMC/*"

So, what is wrong with my existing content?  Is there something wrong with my indexes?  And, how do I fix it?