cancel
Showing results for 
Search instead for 
Did you mean: 

Search Yields Unexpected Results

stevewickii
Champ in-the-making
Champ in-the-making
According to the Search WIKI at http://wiki.alfresco.com/wiki/Search#Category_Queries

There are not true child relationships between category type nodes and the things they categorize. However, these links can be searched using the special "member" QName.
And
This finds any child that is not a "member" child.

To find all subclassifications of "cmSmiley Frustratedoftware Document Classification" is more complex as you need to find any children that are not members of the category (ie things that are children but have not been categorised)

+PATH:"/cm:generalclassifiable//cmSmiley Frustratedoftware_x0020_Document_x0020_Classification//*"
-PATH:"/cm:generalclassifiable//cmSmiley Frustratedoftware_x0020_Document_x0020_Classification//member"

From these two statements I conclude that a search for "//*" will return subcategories and members, and a query for "//member" will only return members.

The problem is, Alfresco is not behaving as documented.  I am using Alfresco 2.9.0B build 707 on Windows XP Business Server with Tomcat 5.5 and Java 1.6.0_04.

I have a category hierarchy consisting of Regions/USA/<state abbreviations>/<counties>, and I have hundreds of documents assigned to <state abbreviations> and <counties>.

A Lucene query in the Node Browser for +PATH:"/cm:generalclassifiable/cm:Regions/cm:USA//* matches 401 rows.  All of these are Documents.  None of these are subcategories of Regions/USA as expected.
A Lucene query in the Node Browser for +PATH:"/cm:generalclassifiable/cm:Regions/cm:USA//member" matches 201 rows.  Again, all of these are Documents, but I expected this from the document quoted above.

I have two BIG problems with these results.
1.  Why aren't all 401 documents being returned by the query +PATH:"/cm:generalclassifiable/cm:Regions/cm:USA//member?
2.  Why isn't the query +PATH:"/cm:generalclassifiable/cm:Regions/cm:USA//* returning any category nodes as documented on the WIKI?

Impact:  We have clients complaining that documents in Alfresco are not showing up on their websites.  Their websites use the Alfresco web service client to perform Lucene queries for documents by category PATH (as documented on the Search WIKI - we use the "/member" QName for finding documents assigned to a category), and Alfresco is not returning results as documented.

Let me know if you are seeing this issue as well, in this version of Alfresco or another.

I am starting this conversation on the forums to confirm that this is a bug before I post a Bug to the Alfresco JIRA, so your help is necessary and appreciated.

Cheers!

Stephen
4 REPLIES 4

dinger
Champ in-the-making
Champ in-the-making
You've got the wrong query. You want something like:

PATH:"/cm:generalclassifiable//cm:United_x0020_States_x0020_of_x0020_America//*"

Unless your categories are set up differently to me?

How are you running the queries? Have you tried them in the node browser?

Rob

stevewickii
Champ in-the-making
Champ in-the-making
My categories are set up differently.

I have a Regions/USA/<state abbr>/<county name> category hierarchy.

dinger
Champ in-the-making
Champ in-the-making
What happens when you run the query in the node browser?

Rob

stevewickii
Champ in-the-making
Champ in-the-making
See Original Post.  Every query was executed through the Node Browser.