Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am working in the Umbraco 6.0.5 website.
I have implemented the XSLT search on the site for search functionality.
Its working fine. It is searching through the Umbraco nodes prefectly.
But my client needs that it should search through the databse as well.
For instance, I have seached "Test". Its searching through the Umbraco content and displaying result.. But it should also search through other databse table data and display result with that result.
Any package available for that?
Or anyone have done the same before?
Appreciate if anyone could help.
Thanks in advance.
You're quite right, XSLTsearch only searches within content pages,not the database directly. A direct database search would be slow, so XSLTsearch uses the in-memory cache of all published content for super-fast searches.
XSLTsearch has been replaced by ezSearch, which uses Razor rather than XSLT and the Examine Lucene content index rather than the in-memory xml cache. Conceptually, they both do the same things and if you're familiar with how XSLTsearch works then you'll immediately understand how ezSearch works. It's just the ezSearch uses newer technologies and will thus be easier to extend. So going forward I'd recommend ezSearch instead of XSLTsearch.
In either case, though, neither is doing a brute force search of database tables. But, if you can push database content into an Examine index and then search for it with ezSearch or directly from Examine. This forum thread should help get you started. https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/65160-LuceneExamine-index-search-of-database-data
Thanks Doug for the reply.
I will surely check this and let you know if it worked for me or not.
Also will check the ezSearch.
Finally i managed to achieve it in the XSLTSearch file itselt.
What I did is :
Added C# code to get the data from the database.
Registered that into the XSLT.
Append that data with XSLT Search match nodes.
Below is the code for that :
Get the data from database using below code :
<msxsl:script language="C#" implements-prefix="ps">
public System.Xml.XmlDocument GetList(string str, string delimiter,string searchText)
string items = str.Split(delimiter.ToCharArray(), StringSplitOptions.None);
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
using (System.Xml.XmlWriter writer = doc.DocumentElement.CreateNavigator().AppendChild())
// Put code here to add database data
foreach (string item in items)
Get the list in the XSLT :
<!--Get the search data from the Database-->
<xsl:variable name="xmlData" select="msxml:node-set(ps:GetList('one,two,three,four,five,six', ',',$search)/*)"></xsl:variable>
Hope this will work if anyone needs to add this king of functionality.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted