mdo:searchable

XsltDb allows populating DotNetNuke search index exactly as you do it when implementing ISearchable interface.

<!-- Some business code goes here -->
...

<!-- This section is not rendered to a page and executed only when DNN indexer collects data to be indexed -->
<mdo:searchable>
  <root>
    <xsl:for-each select="mdo:sql('select * from Articles where LastUpdateDate &gt; dateadd(day,-2,getdate())', 'article')//article">
      <search-item>
        <title>{{Title}}</title>
        <description>{{LongDescription}}</description>
        <content>{{BodyText}}</content>
        <user>{{AuthorUserID}}</user>
        <date>{{mdo:fmt-date(LastUpdateDate, 'yyyy-MM-dd HH:mm:ss')}}</date>
        <key>{{ID}}</key>
        <guid>ID={{ArticleID}}&amp;template=simple</guid>
      </search-item>
    </xsl:for-each>
  </root>
</mdo:searchable>
Detailed description with sample coming soon.

Last edited Sep 10, 2010 at 9:52 AM by findy, version 10

Comments

mvanlaar Aug 31, 2013 at 12:02 PM 
fixed it, there are bugs with mdo:sql and the new 7.1 dnn

mvanlaar Aug 17, 2013 at 10:56 AM 
Has anyone got the example working? If i create search items with the hand it works but not within a <xsl:for each>