I am trying to query an Alfresco 5.2 repo using cmis-strict in the node browser.
I have 5 documents in a folder tree.
2 of those 5 documents have a multi-value property accountreference = 1927615 and a single value property crmindex = X1943G;.UL
Example 1
SELECT * FROM figaro:basetype WHERE IN_TREE('06080482-d235-4dec-bf7b-4e6027e88aab')
Expected result = 5 documents
Actual result = 5 documents
Example 2
SELECT * FROM figaro:basetype WHERE '1927615' = ANY figaro:accountreference
Expected result = 2 documents
Actual result = 2 documents
Example 3
SELECT * FROM figaro:basetype WHERE figaro:crmindex='X1943G;.UL'
Expected result = 2 documents
Actual result = 2 documents
Example 4
SELECT * FROM figaro:basetype WHERE IN_TREE('06080482-d235-4dec-bf7b-4e6027e88aab') AND figaro:crmindex='X1943G;.UL'
Expected result = 2 documents
Actual result = 2 documents
Example 5
SELECT * FROM figaro:basetype WHERE '1927615' = ANY figaro:accountreference AND figaro:crmindex='X1943G;.UL'
Expected result = 2 documents
Actual result = 2 documents
Example 6
SELECT * FROM figaro:basetype WHERE IN_TREE('06080482-d235-4dec-bf7b-4e6027e88aab') AND '1927615' = ANY figaro:accountreference
Expected result = 2 documents
Actual result = 0 documents
THE PROBLEM
Using an AND in a WHERE clause that uses IN_TREE and a multi-value property returns zero results.
Does anyone have any ideas about this?
Solved! Go to Solution.
I've tried a similar approach with Alfresco 6.1 and Search Services 1.3.0.1 and it works for me.
SELECT *
FROM figaro:basetype
WHERE IN_TREE('e416ed7a-bb59-4805-ac86-aa6cbdcc4c9e') AND
'1927615' = ANY figaro:accountreference
Upgrading is an option?
I've tried a similar approach with Alfresco 6.1 and Search Services 1.3.0.1 and it works for me.
SELECT *
FROM figaro:basetype
WHERE IN_TREE('e416ed7a-bb59-4805-ac86-aa6cbdcc4c9e') AND
'1927615' = ANY figaro:accountreference
Upgrading is an option?
Thanks for your input.
I’ve just rebuilt the entire Solr index and cleared out the Solr models.
The query now works as expected.
I’m not sure what went wrong there. It’s a bit worrying.
Re-indexing is required when introducing changes in the model. If your model is stable, no re-indexing should be required.
That might explain it. I added a new doc type using the model manager.
It it seems unfortunate that you can change the model interactively in model manager but still need to clear down Solr manually under the covers and rebuild the index.
Is there a simple way of doing this?
You can change the model, and the changes are updated in SOLR.
However if you are working with a new Model and make some tests, this documents will be indexed with existing properties.
When you modify the model and (for instance) you add a new property, new documents will be indexed with this new property, but old documents are not being indexed with the new one. You can re-index them manually or perform a full re-indexation.
In PROD environments, playing live with the Model is not the recommended approach.
Many thanks for the clarification
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.