cancel
Showing results for 
Search instead for 
Did you mean: 

Call the system Searh Service.

amantay
Champ in-the-making
Champ in-the-making
Hi friends,
I found this URL through FireBug from Alfresco advanced search page.
http://localhost:8080/alfresco/wcservice/api/search/keyword/description.xml
Then, put it in my browser, response was interesting description.xml file. Which is as follows:

<OpenSearchDescription>
<ShortName>Alfresco Keyword Search</ShortName>
<LongName>Alfresco Community Keyword Search 3.4.0 (c 3335)</LongName>
<Description>Search Alfresco "company home" using keywords</Description>
<Url type="text/html" template="http://localhost:8080/alfresco/wcservice/api/search/keyword?q={searchTerms}&p={startPage?}&c={count?...>
<Url type="application/atom+xml" template="http://localhost:8080/alfresco/wcservice/api/search/keyword.atom?q={searchTerms}&p={startPage?}&c={c...>
<Url type="application/rss+xml" template="http://localhost:8080/alfresco/wcservice/api/search/keyword.rss?q={searchTerms}&p={startPage?}&c={co...>

<Image height="16" width="16" type="image/x-icon">
http://localhost:8080/alfresco/images/logo/AlfrescoLogo16.ico
</Image>
</OpenSearchDescription>
Once again, I continue to experiment, get from description.xml this url:
http://localhost:8080/alfresco/wcservice/api/search/keyword?q={searchTerms}&p={startPage?}&c={count?...
And put it in browser with parameters like:
{searchTerms} = alfresco (you can put any word)
{startPage?} = 1 (this page number)
{count?} = 10 (count of result items in one page)
{alf:guest?} = (it is your ticket)
http://localhost:8080/alfresco/wcservice/api/search/keyword?q=alfresco&p=1&c=10&l=en

Result will be like, if you enter "alfresco" word in you alfresco search. But I still do not understand, can i input in {searchTerms}  parameters like date, category, content type and so on?
4 REPLIES 4

openpj
Elite Collaborator
Elite Collaborator
No, the keyword search executes only a full text search without considering metadata.
This specific service will search on text indexed from binaries.

sameer1sharma
Champ in-the-making
Champ in-the-making
In http://localhost:8080/alfresco/wcservice/api/search/keyword/description.xml, I am getting ip address which leads to disclose information. My requirement is not to show ip when accessing above url. Even disabling/hide also fulfill my requirement. Please help me out.

When the above url is invoked, it basically renders the keywordsearchdescription.get.opensearchdescription.ftl. It is present at tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\repository\search location in out-of-the-box alfresco  and it uses abs{url.serviceContext} to generate the whole url. If you do not want url with server information then, you should try using only url.serviceContext. This way it will generate url starting with /alfresco/service.

Hope this helps.

Thank you Ramesh Chauhan.