How to use CONTAINS on metadata ?

cancel
Showing results for 
Search instead for 
Did you mean: 
berguiz
Member II

How to use CONTAINS on metadata ?

Jump to solution

Hello,

I try to use the function CONTAINS in my query but I can not to get my documents with it.

SELECT * FROM my:medatas WHERE my:type='TYPE1'

works fine. While the query :

SELECT * FROM my:medatas m WHERE CONTAINS(m, 'TYPE1')

works (no exceptions) but I have not any documents.

I want to use this function because I would like to make a search on all the properties and not only on my:type.

1 Solution

Accepted Solutions
andy1
Senior Member

Re: How to use CONTAINS on metadata ?

Jump to solution

Hi

CMIS  CONTAINS() by default matches only content.

If you are using the public API it is possible to change this default.

There is an example here.

You can specify the field in the query. Beware, the CMIS specification is quite limited but we support any Alfresco full text search expression in CONTAINS() - the CMIS specification is a sub-set that assumes you mean content.

SELECT * FROM my:medatas WHERE CONTAINS('my:type=TYPE1')

Andy

View solution in original post

1 Reply
andy1
Senior Member

Re: How to use CONTAINS on metadata ?

Jump to solution

Hi

CMIS  CONTAINS() by default matches only content.

If you are using the public API it is possible to change this default.

There is an example here.

You can specify the field in the query. Beware, the CMIS specification is quite limited but we support any Alfresco full text search expression in CONTAINS() - the CMIS specification is a sub-set that assumes you mean content.

SELECT * FROM my:medatas WHERE CONTAINS('my:type=TYPE1')

Andy

View solution in original post