Why does, when using contains in CMIS query works as like predicate. For example, consider the following query,
Select * from common:basedoctype where CONTAINS('PATH:"//app:company_home/st:sites/cm:digitalcontent/cm:documentLibrary//*"') AND common:keywords ='external_link'.
This query returns all content with keywords 'external_link' and also those contents with keywords 'external_link_text' as well. when i remove the contains clause it return only the contents with keywords external_link.
Why does when using contains it works as if i specified external_link*.
Hi:
Probably it is due that your custom property (common:keywords) is being tokenized when indexing. This is done in the indexation part of the cited property in your content model definition. Maybe with a tokenized=false, and a reindexation of this property is enough. But test it first in a dev env to be sure, cause this may be complicated in a production env with many documents with this property (as it may involve a non incremental change of your content model, reindexation, etc).
Regards.
--C.
Hi,
Thanks for the reply. I will try it out.
Can you explain what tokenized means?
Also does setting tokenised to false makes the search case sensitive?
Hi:
Some links:
Content Model - Defining and Deploying | Alfresco Documentation (look for tokenized)
Transactional metadata queries supported by database | Alfresco Documentation
Regards.
--C.
Hi
If a query goes to the database, case sensitivity is defined by the database collation. With SOLR, full text search matches are case insensitive and identifier matches are case sensitive.
Andy
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.