CMIS contains query issue

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

CMIS contains query issue

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*.

4 Replies
Highlighted
Advanced

Re: CMIS contains query issue

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.

Highlighted
Active Member

Re: CMIS contains query issue

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?

Highlighted
Advanced

Re: CMIS contains query issue

Hi:

  • Tokenized means that the value for the SOLR index is splitted in parts (usually by blank spaces or undercores), and indexed separately (usually both, the full term and their part). You have some part of the value in common, so the CMIS query may give both results. The thing is that when using CONTAINS predicate, SOLR does search, and when CONTAINS is not part of the query this query may be solve by the database (depending on your search setup).
  • No, AFAIK, CMIS searches are case sensitive.

Some links:

Content Model - Defining and Deploying | Alfresco Documentation (look for tokenized)

Transactional metadata queries supported by database | Alfresco Documentation 

Regards.

--C.

Highlighted
Senior Member

Re: CMIS contains query issue

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