|
|
Rank: Newbie
Joined: 10/6/2008 Posts: 3 Location: Denmark
|
Hi,
I would like to perform a search operation on the umbraco content from an external application. My idea is to make a webservice returning ID’s for the documents found.
But how do I programmatically search the published content ??
Kirsten
|
|
Rank: Aficionado
Joined: 6/25/2007 Posts: 146 Location: Malmo, Sweden
|
Kirsten wrote:Hi,
I would like to perform a search operation on the umbraco content from an external application. My idea is to make a webservice returning ID’s for the documents found.
But how do I programmatically search the published content ??
Kirsten
Take a look at the XSLT Search package for Umbraco. It is not a web service but a regular search form that searches the umbraco content nodes and returns a list of the nodes matching. I think it should not be to hard to manipulate it to do what you want.
Is it me or umbraco? Umbraco Certified Professional Level 2.
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 815 Location: Århus, Denmark
|
Depending on the volume of content on your site, you might also want to look into using the Lucene search that is included in Umbraco. I have not used it myself, but I know there have been various extensions to the existing functions. XSLT search will work well up to around 1000 nodes, depending on the number of properties you need to search through.
|
|
Rank: Newbie
Joined: 10/6/2008 Posts: 3 Location: Denmark
|
Thanks for the answers, Daniel and Morten.
I have been looking at both solution but can't find the properly solution.
The xslt solution are intended to be used in a macro in a template to render the result. I guess that what I have to do is to import the umbraco.config file into a XPathDocument, programmatically give the parameter currentPage a value and then transform the xml with xslt to get the ID's of the selected documents ??
The Lucene Search solution would be a good solution but I can't find any documentation on how to implement it in the code. I have been looking at the umbraco.cms.businesslogic.index namespace, but it seems to search in the content part in the administration console - that means both published and unpublished content and without the words from the templates.
Any suggestions ??
|
|
Rank: Aficionado
Joined: 6/25/2007 Posts: 146 Location: Malmo, Sweden
|
Kirsten wrote:The xslt solution are intended to be used in a macro in a template to render the result. I guess that what I have to do is to import the umbraco.config file into a XPathDocument, programmatically give the parameter currentPage a value and then transform the xml with xslt to get the ID's of the selected documents ?? I was thinking you could include the XSLT macro in a blank template. Then modify the XSLT macro to output XML or JSON or whatever format you want. Use the template on a otherwise empty content node. Call this content node from your external app with the search phrase as a querystring. Parse the text retrieved.
Is it me or umbraco? Umbraco Certified Professional Level 2.
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 815 Location: Århus, Denmark
|
Kirsten wrote: I have been looking at the umbraco.cms.businesslogic.index namespace, but it seems to search in the content part in the administration console - that means both published and unpublished content and without the words from the templates.
None of the options will search the template contents. Only node contents are searched. If you want crawler search, you need to look a some other solution. Maybe this: http://kenny.no/archive/2008/9/25/microsoft-search-server-express-2008-and-umbraco.aspx
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 670 Location: Preston, UK
|
|
|
Rank: Newbie
Joined: 10/6/2008 Posts: 3 Location: Denmark
|
Thanks for the responses. I now have information to move forward !
|
|
|
Guest |