cancel
Showing results for 
Search instead for 
Did you mean: 

Searching tags in CMIS Query

jboss
Champ in-the-making
Champ in-the-making
Hi,

I am trying to write a custom app on top of alfreco, and for our document search we are currently using the CMIS query language to return and sort search results.  I'd like to include results whose tags match the search terms as well, but from everything I've seen on the forum, it would have to be a totally separate query with the results of the queries merged to get the effect I want. 

Can anyone comment on returning documents with tags matching a CMIS query?

Thanks!
7 REPLIES 7

andy
Champ on-the-rise
Champ on-the-rise
Hi

Tags are categories under the covers - so you could query them that way.

"PATH:\"/cm:taggable/cm:" + ISO9075.encode(tag) + "/member\"");

We have recently added the TAG keyword to Alfresco FTS to do just this.
This will be exposed via CMIS CONTAINS() at some point.
I woudl have to check if PATH is exposed via CMIS query (I know some internal fields like ALL, TEXT are not)

Andy

rat8602
Champ in-the-making
Champ in-the-making
I am using this query to obtain tags od dfocumente:
select d.*, o.* from cmis:document as d join cm:taggable as o on d.cmisSmiley Surprisedbjectid = o.cmisSmiley Surprisedbjectid


On queryresult["o.cm:taggable"] i have a list of id tags: (example    workspace://SpacesStore/36e92529-c355-4429-b3b3-f91ffa17feea)


Can i obtain the name ???
There is a method to receive id from tag name?

Thanks

P.s i use dotCMIS of APache chemistry

andy
Champ on-the-rise
Champ on-the-rise
Hi

The tag should be a noderef, so you should be able to use it as an id and get its properties.
There is no "real" join in the query support to get this.

Andy

brogits
Champ in-the-making
Champ in-the-making
is there a documentation we can read on using the query on CMIS agains alfresco cmis:document?

like if i would like to only retrieve a specific page (e.g. blog3.html) is this possible.

i have this url: /Sites/demosite/documentLibrary/Alfresco Quick Start/Quick Start Editorial/root/blog/blog1.html and i would like to select that specifically

thanks for the help

lolipop
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to query for a document that has a specific tags. Therefore I tried the following query like it is described in the full text search (http://wiki.alfresco.com/wiki/Full_Text_Search_Query_Syntax)but it won't work.

SELECT * FROM cmis:document WHERE CONTAINS ('TAG:testtag')

I'm using alfresco 4.0a.

Any help would be appreciated.

Thanks

samsam
Champ in-the-making
Champ in-the-making
How do I execute CMIS queries from javascript? As I am new to alfresco I am facing some issues in this.Thanks in advance

menza
Champ in-the-making
Champ in-the-making
Hi

The tag should be a noderef, so you should be able to use it as an id and get its properties.
There is no "real" join in the query support to get this.

Andy

Hi Andy,

when I try to access the node, i get this error:

An error has occured in the Share component: /share/service/components/node-details/node-header.
It responded with a status of 500 - Internal Error.
Error Code Information: 500 - An error inside the HTTP server which prevented it from fulfilling the request.
Error Message: 10130000 Failed to process template org/alfresco/components/node-details/node-header.get.html.ftl

Any ideas what i am doing wrong here?