cancel
Showing results for 
Search instead for 
Did you mean: 

Open Search - Javascript exception when searching new server

sergio
Champ in-the-making
Champ in-the-making
Hi all.

My figthing with Open Search continues.

I have configured my Alfresco 2.0 in order to execute a distributed search against a list of different repositories. I edited the file web-api-config-custom.xml provided by the installation as web-api-config-custom.xml.sample in the following way:

<config evaluator="string-compare" condition="OpenSearch">
      <opensearch>
     
         <engines>
        
            <!–                                                     –>
            <!–  Example: Registration of remote Alfresco Server    –>
            <!–                                                     –>

            <!–  TODO: Find/Replace [host] with server host name    –>
            <!–  TODO: Find/Replace [port] with server port number  –>
               
            <engine label="NSI (nsiserverw2k) Alfresco Repository" proxy="remote">
               <url type="application/atom+xml">
                  http://nsiserverw2k:8081/alfresco/service/search/keyword?q={searchTerms}&p={startPage?}&c={count?}&l...
               </url>
   
               <url type="application/rss+xml">
                  http://nsiserverw2k:8081/alfresco/service/search/keyword?q={searchTerms}&p={startPage?}&c={count?}&l...
               </url>
            
            </engine>
           
            <!–                                                     –>
            <!–  Example: Registration of Alfresco's Open Talk Blog –>
            <!–                                                     –>

            <engine label="Alfresco Open Source Talk" proxy="opentalk">
               <url type="application/rss+xml">
                  http://blogs.alfresco.com/opentalk/os-query?s={searchTerms}&itemstart={startIndex?}&itempage={startP...?}
               </url>
            </engine>
           
         </engines>
        
      </opensearch>
   </config>

The remote machine nsiserverw2k hosts a second Alfresco 2.0 installation.

When executing a search using the OpenSearch HTTP API provided with Alfresco, the results are good for the Alfresco Open Source Talk engine, bad for my second Alfresco repository.

The following javascript message is returned back: An error occurred: object needed

The search fails.

Any engineer from Alfresco can help me? OpenSearch capabilities are very good but documentation from Alfresco is still poor and not so clear.

Many thanks and many conpliments to the Alfresco team.

Cheers,

Sergio
2 REPLIES 2

davidc
Star Contributor
Star Contributor
Can you try issuing…

http://nsiserverw2k:8081/alfresco/service/search/keyword?q=tutorial&guest=true&format=atom

in your browser.  Does it come back with a response?

Are you using Firefox? Do you have Firebug installed?  It may give some more detail to the error you have which may help us diagnose.

sergio
Champ in-the-making
Champ in-the-making
Hello David.

Many thanks for your reply, I was able to solve the problem just a little before your answer removing the proxy attribute from the engine entity. Now the distribuited search works well.

Thanks and all the best,

Sergio