CMIS query - how to search for document content?

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

fpvolquind
Posts: 1
Joined: Mon Nov 27, 2017 7:58 pm

CMIS query - how to search for document content?

Mon Nov 27, 2017 8:06 pm

Hi!
I am trying to use LogicalDOC as the document repository for an application in Java. I can properly connect to the CMIS Atompub interface, and query for document name. How do I build a query so it searches for document content as well? Also, how do I return search matching score?

For example, on Alfresco, I use the following syntax:

Code: Select all

SELECT cmis:name, cmis:objectId, SCORE () FROM cmis:document WHERE IN_FOLDER('fld.folderID') AND (CONTAINS('keyword') OR cmis:name LIKE '%keyword%') ORDER BY SEARCH_SCORE DESC
Also, on Apache CMIS Workbench, the query returns only a single column; I had to change it to "SELECT * FROM ..." to return other columns. Is this a bug?

Thanks for your attention.
agaspa
Posts: 543
Joined: Tue Apr 20, 2010 8:24 am

Re: CMIS query - how to search for document content?

Fri Dec 01, 2017 12:36 pm

Hi fpvolquind,
I think that definitely there is something clanking with the CMIS implementation of LogicalDOC even tough it uses Apache Chemistry OpenCMIS

Perhaps something can be fixed, but the CMIS module it's quite delicate, because it is used by other external modules/software.
I found however that if you remove the spaces in the select arguments you can see more columns (but not the SCORE())
In attachment you can find the results of my tests
Attachments
cmis-query.zip
CMIS queries tested agains LD 7.7.2 patched
(698 Bytes) Downloaded 5 times

Return to “Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest