cancel
Showing results for 
Search instead for 
Did you mean: 

Question about org.alfresco.wcm.client.Query

mnoones
Champ in-the-making
Champ in-the-making
Hello all.

Executing a query doing something like this works fine:

var query = section.createQuery()
query.setPhrase("health")
var searchResults = section.search(query)

But, can I execute a cmis query with the setPhrase method? I need to do something a bit more complicated.

Appreciate any help!
6 REPLIES 6

bremmington
Champ on-the-rise
Champ on-the-rise
Unfortunately not out of the box, no. You would have to either extend the WQS Query mechanism or go straight to CMIS. You can get an OpenCMIS session by calling the static method CmisSessionHelper.getSession if you want to go that root.

mnoones
Champ in-the-making
Champ in-the-making
is that available from a webscript?

bremmington
Champ on-the-rise
Champ on-the-rise
Sorry, I'm not with you. Is what available from a web script?

mnoones
Champ in-the-making
Champ in-the-making
Sorry, by webscript I mean something like webscripts\article\style1.get.js. So can I get a handle on CmisSessionHelper.getSession from this webscript.

bremmington
Champ on-the-rise
Champ on-the-rise
Ah, I see what you mean. No, that wouldn't be available by default in a component, although you could probably add it with a little effort. OpenCMIS sessions are not particularly JavaScript friendly however. You could write a java-backed component to handle your particular needs. Take a look at the rss component for an example of that.

mnoones
Champ in-the-making
Champ in-the-making
I will look at that. Thank you.