alfresco search Error

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

alfresco search Error

Hi, 

We are currently using  Alfresco  v 5.2 that we have deployed on a Tomcat server.

We are using  the v0 web script as shown below

<description>Share Search Component Data Webscript</description>
<url>/slingshot/search?term={term?}&tag={tag?}&site={site?}&container={container?}&sort={sort?}&query={query?}&repo={repo?}</url>
 
The query param dosen't work (for me)==> always bad request
But, when I use the term param, the service  work as expected.
 
6 Replies
Highlighted
Advanced

Re: alfresco search Error

The query parameter  need a json parameter ,following document is extracted from source code
  // Advanced search form data search.
   // Supplied as json in the standard Alfresco Forms data structure:
   //    prop_<name>:value|assoc_<name>:value
   //    name = namespace_propertyname|pseudopropertyname
   //    value = string value - comma separated for multi-value, no escaping yet!
   // - underscore represents colon character in name
   // - pseudo property is one of any cm:content url property: mimetype|encoding|size
   // - always string values - interogate DD for type data
   // - an additional "-mode" suffixed parameter for a value is allowed to specify
   //   either an AND or OR join condition for multi-value property searches

 

Why not use the rest api, it is recommened

 

alfresco/api/-default-/public/search/versions/1/search

 

 

Highlighted
Member II

Re: alfresco search Error

We are working with angular .we are  in fact using Alfresco JS API library, but we could not found a way to use it with java backend this pushed us to use the v0 web script .

REST API  it is possible with JSP   ?? lien 

And thank you for your previous answer

 

Highlighted
Advanced

Re: alfresco search Error

About how to call alfresco search rest api using alfresco-js-api ,please refer to
Highlighted
Member II

Re: alfresco search Error

Hi ,I have already worked with these services in javascript but I'm looking for a solution with the java language(example cmis) that's why I just used the predefined web scripts with alfresco repository it works for me only with the search web script I have a problem like I told you previously

Highlighted
Alfresco Employee

Re: alfresco search Error

I guess you just need to escape your query param...

Software Engineer in Alfresco Search Team.
Highlighted
Member II

Re: alfresco search Error

really i am stuck especially that the code works correctly in the past except that i reinstall alfresco !!!!