<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://shazwazza.com/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Shazwazza</title>
    <link>https://shazwazza.com/</link>
    <description>My blog which is pretty much just all about coding</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <image>
      <url>/media/0libq25y/frog.png?rmode=max&amp;v=1da0e911f4e6890</url>
      <title>Shazwazza</title>
      <link>https://shazwazza.com/</link>
    </image>
    <item>
      <guid isPermaLink="false">1241</guid>
      <link>https://shazwazza.com/post/examine-slide-deck-for-codegarden-2010/</link>
      <category>Umbraco</category>
      <category>Examine</category>
      <title>Examine slide deck for CodeGarden 2010</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt;A few people had asked during &lt;a href="http://www.codegarden10.com/" target="_blank"&gt;CodeGarden 2010&lt;/a&gt; if I would post up the slide deck for my &lt;a href="http://farmcode.org/page/Umbraco-Examine.aspx" target="_blank"&gt;Examine&lt;/a&gt; presentation, so here it is. There’s not a heap of information in there since i think people would have soaked up most of the info during the examples and coding demos but it’s posted here regardless and hopefully it helps a few people.  &lt;p&gt;I’ve included a PDF version (link at the bottom) and also the image version below (if you’re too lazy to download it :)&lt;/p&gt; &lt;p&gt;&lt;a href="/image.axd?picture=Slide2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide2" border="0" alt="Slide2" src="/image.axd?picture=Slide2_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide3.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide3" border="0" alt="Slide3" src="/image.axd?picture=Slide3_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide4.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide4" border="0" alt="Slide4" src="/image.axd?picture=Slide4_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide5.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide5" border="0" alt="Slide5" src="/image.axd?picture=Slide5_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide6.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide6" border="0" alt="Slide6" src="/image.axd?picture=Slide6_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide7.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide7" border="0" alt="Slide7" src="/image.axd?picture=Slide7_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide8.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide8" border="0" alt="Slide8" src="/image.axd?picture=Slide8_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide9.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide9" border="0" alt="Slide9" src="/image.axd?picture=Slide9_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide10.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide10" border="0" alt="Slide10" src="/image.axd?picture=Slide10_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide11.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide11" border="0" alt="Slide11" src="/image.axd?picture=Slide11_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide12.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide12" border="0" alt="Slide12" src="/image.axd?picture=Slide12_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide13.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide13" border="0" alt="Slide13" src="/image.axd?picture=Slide13_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide14.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide14" border="0" alt="Slide14" src="/image.axd?picture=Slide14_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt; &lt;a href="/image.axd?picture=Slide15.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Slide15" border="0" alt="Slide15" src="/image.axd?picture=Slide15_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt;&lt;/p&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:1b5d2913-dbe5-46b3-ba32-d697014fd1f3" class="wlWriterSmartContent"&gt; &lt;p&gt;Download slide deck &lt;a href="http://farmcode.org/file.axd?file=Examine2_1.pdf" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:13 Z</pubDate>
      <a10:updated>2023-03-23T15:08:13Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1311</guid>
      <link>https://shazwazza.com/post/using-examine-to-index-search-with-any-data-source/</link>
      <category>Examine</category>
      <title>Using Examine to index &amp; search with ANY data source</title>
      <description>&lt;div class="imported-post"&gt;This post was imported from FARMCode.org which has been discontinued. These posts now exist here as an archive. They may contain broken links and images.&lt;/div&gt; &lt;p&gt;During &lt;a title="CodeGarden 2010" href="http://codegarden10.com/" target="_blank"&gt;CodeGarden 2010&lt;/a&gt; a few people were asking how to use &lt;a title="Examine" href="http://farmcode.org/page/Umbraco-Examine.aspx" target="_blank"&gt;Examine&lt;/a&gt; to index and search on data from any data source such as custom database tables, etc… Previously, the only way to do this was to override the Umbraco Examine indexing provider, remove the Umbraco functionality embedded in there, and then do a lot of coding yourself.&amp;nbsp; …But now there’s some great news! As of now you can use all of the Examine goodness with it’s embedded &lt;a title="Lucene.Net" href="http://www.lucene.net/" target="_blank"&gt;Lucene.Net&lt;/a&gt; with any data source and you can do it VERY easily. &lt;/p&gt; &lt;p&gt;Some things you need to know about the new version:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;I haven’t made a release version of this yet as it still needs some more testing, though we are putting this into a production site next week.  &lt;li&gt;If you want to try this, currently you’ll need to get the latest source from &lt;a title="Examine @ CodePlex" href="http://examine.codeplex.com" target="_blank"&gt;Examine @ CodePlex&lt;/a&gt;  &lt;li&gt;If you are using a previous version of Examine, there’s a few breaking changes as some of the class structures have been moved, however you config file should still work as is… HOWEVER, you should update your config file to reflect the new one with the new class names  &lt;li&gt;There is now 3 DLLs, not just 2:  &lt;ul&gt; &lt;li&gt;Examine.DLL  &lt;ul&gt; &lt;li&gt;Still pretty much the same… contains the abstraction layer &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Examine.LuceneEngine.DLL  &lt;ul&gt; &lt;li&gt;The new DLL to use to work with data that is not Umbraco specific &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;UmbracoExamine.DLL  &lt;ul&gt; &lt;li&gt;The DLL that the Umbraco providers are in &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Ok, now on to the good stuff. First, I’ve added a demo project to this post which you can download &lt;a title="Examine Demo App" href="/examinedemoapp/examinedemo.zip" target="_blank"&gt;&lt;strong&gt;&lt;font size="5"&gt;HERE&lt;/font&gt;&lt;/strong&gt;&lt;/a&gt;. This project is a simple console app that contains a sample XML data file that has 5 records in it. Here’s what the app does:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;This re-indexes all data  &lt;li&gt;Searches the index for node id 1  &lt;li&gt;Ensures one record is found in the index  &lt;li&gt;Updates the dateUpdated time stamp for the data record  &lt;li&gt;Re-indexes the record with node id 1’ &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;So assuming that you have some custom data like a custom database table, xml file, or whatever, there’s really only 3 things that you need to do to get Examine indexing your custom data:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Create your own &lt;em&gt;ISimpleDataService &lt;/em&gt; &lt;ul&gt; &lt;li&gt;There is only 1 method to implement: &lt;em&gt;IEnumerable&amp;lt;SimpleDataSet&amp;gt; GetAllData(string indexType)&lt;/em&gt;  &lt;li&gt;This is the method that Examine will call to re-index your data  &lt;li&gt;A &lt;em&gt;SimpleDataSet &lt;/em&gt;is a simple object containing a &lt;em&gt;Dictionary&amp;lt;string, string&amp;gt;&lt;/em&gt; and a &lt;em&gt;IndexedNode&lt;/em&gt; object (which consists of a Node Id and a Node Type)  &lt;li&gt;For example, if you had a database row, your SimpleDataSet object for the row would be the dictionary of the rows values, it’s node id and type … easy. &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Use the &lt;em&gt;ToExamineXml()&lt;/em&gt; extension method to re-index individual nodes/records  &lt;ul&gt; &lt;li&gt;Examine relies on data being in the same XML structure as Umbraco (which we might change in version 2 sometime in the future… like next year) so we need to transform simple data into the XML structure. We’ve made this quite easy for you; all you have to do is get the data from your custom data source into a &lt;em&gt;Dictionary&amp;lt;string, string&amp;gt;&lt;/em&gt; object and use this extension method to pass the xml structure in to Examine’s &lt;em&gt;ReIndexNode&lt;/em&gt; method.  &lt;li&gt;For example: &lt;em&gt;ExamineManager.Instance.ReIndexNode(dataSet.ToExamineXml(dataSet["Id"], "CustomData"), "CustomData");&amp;nbsp; &lt;/em&gt;where dataSet is a &lt;em&gt;Dictionary&amp;lt;string, string&amp;gt;&lt;/em&gt; . &lt;/li&gt;&lt;/ul&gt; &lt;li&gt;Update your Examine config to use the new &lt;em&gt;SimpleDataIndexer&lt;/em&gt; index provider and the new &lt;em&gt;LuceneSearcher &lt;/em&gt;search provider &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;If you’re not using Umbraco at all, then you’ll only need to have the 2 Examine DLLs which don’t reference the Umbraco DLLs whatsoever so everything is decoupled.&lt;/p&gt; &lt;p&gt;I’d recommend downloading the demo app and running it as it will show you everything you need to know on how to get Examine running with custom data. However, i know that people just like to see code in blog posts, so here’s the config for the demo app:&lt;/p&gt;   &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:18fee6e6-5c56-4986-9781-fac4483ebbbe" class="wlWriterSmartContent"&gt;&lt;pre style="background-color: white; width: 579px; height: 742px; overflow: auto"&gt;&lt;div&gt;&lt;!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #ff00ff"&gt;xml version="1.0" encoding="utf-8" &lt;/span&gt;&lt;span style="color: #0000ff"&gt;?&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;configuration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

  &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;configSections&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;section &lt;/span&gt;&lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Examine"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Examine.Config.ExamineSettings, Examine"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;section &lt;/span&gt;&lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="ExamineLuceneIndexSets"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; 
             type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Examine.LuceneEngine.Config.IndexSets, Examine.LuceneEngine"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
  &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;configSections&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

  &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Examine&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ExamineIndexProviders&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
      &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;providers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

        &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: #008000"&gt; 
        Define the indexer for our custom data.
        Since we're only indexing one type of data, there's 
        only 1 indexType specified: 'CustomData', however
        if you have more than one type of index (i.e. Media, Content) 
        then you just need to list them as a comma seperated list without spaces.
        
        The dataService is how Examine queries whatever data source you have, 
        in this case it's a custom data service defined in this project.
        A custom data service only has to implement one method... very easy.        
        &lt;/span&gt;&lt;span style="color: #008000"&gt;--&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CustomIndexer"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;
             type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Examine.LuceneEngine.Providers.SimpleDataIndexer, 
                Examine.LuceneEngine"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;
             dataService&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="ExamineDemo.CustomDataService, ExamineDemo"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;
             indexTypes&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CustomData"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;
             runAsync&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="false"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

      &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;providers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ExamineIndexProviders&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ExamineSearchProviders &lt;/span&gt;&lt;span style="color: #ff0000"&gt;defaultProvider&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CustomSearcher"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
      &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;providers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
     
        &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: #008000"&gt; 
        A search provider that can query a lucene index, no other 
        work is required here 
        &lt;/span&gt;&lt;span style="color: #008000"&gt;--&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CustomSearcher"&lt;/span&gt;&lt;span style="color: #ff0000"&gt;
             type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Examine.LuceneEngine.Providers.LuceneSearcher, 
                Examine.LuceneEngine"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

      &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;providers&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ExamineSearchProviders&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
  &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Examine&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

  &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ExamineLuceneIndexSets&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

    &lt;/span&gt;&lt;span style="color: #008000"&gt;&amp;lt;!--&lt;/span&gt;&lt;span style="color: #008000"&gt; Create an index set to hold the data for our index &lt;/span&gt;&lt;span style="color: #008000"&gt;--&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;IndexSet &lt;/span&gt;&lt;span style="color: #ff0000"&gt;SetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CustomIndexSet"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; 
              IndexPath&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="App_Data\CustomIndexSet"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
      &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;IndexUserFields&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;        
        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="name"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="description"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
        &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;add &lt;/span&gt;&lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="dateUpdated"&lt;/span&gt;&lt;span style="color: #ff0000"&gt; &lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
      &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;IndexUserFields&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;IndexSet&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;
    
  &lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ExamineLuceneIndexSets&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000"&gt;

&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;configuration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --&gt;&lt;/div&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:13 Z</pubDate>
      <a10:updated>2023-03-23T15:08:13Z</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">1270</guid>
      <link>https://shazwazza.com/post/umbraco-jupiter-plugins-part-2-routing/</link>
      <category>ASP.Net</category>
      <category>Umbraco</category>
      <title>Umbraco Jupiter Plugins - Part 2 - Routing</title>
      <description>&lt;p&gt;This is the second blog post in a series of posts relating to building plugins for Umbraco v5 (Jupiter). &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Related Posts:&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-1.aspx"&gt;Umbraco Jupiter Plugins – Part 1&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;Disclaimer&lt;/h2&gt;  &lt;p&gt;&lt;em&gt;This post is about developing for Umbraco v5 (Jupiter) which at the time of this post is still under development. The technical details described below may change by the time Umbraco Jupiter is released. If you have feedback on the technical implementation details, please comment below.&lt;/em&gt;&lt;/p&gt;  &lt;h1&gt;Routing &amp;amp; URLs&lt;/h1&gt;  &lt;p&gt;As mentioned in the &lt;a href="http://shazwazza.com/post/Umbraco-Jupiter-Plugins-Part-1.aspx"&gt;previous post&lt;/a&gt; Umbraco Jupiter will consist of many types of plugins, and of those plugins many of them exist as &lt;a href="http://www.asp.net/mvc/tutorials/asp-net-mvc-controller-overview-cs" target="_blank"&gt;MVC Controllers&lt;/a&gt;.&amp;#160; Each controller has an Action which a URL is routed to, this means that each Controller plugin in Jupiter requires it’s own unique URLs. The good news is that you as a package developer need not worry about managing these URLs and routes, Jupiter will conveniently do all of this for you. &lt;/p&gt;  &lt;h1&gt;Packages &amp;amp; Areas&lt;/h1&gt;  &lt;p&gt;My previous post mentioned that a ‘Package’ in Jupiter is a collection of ‘Plugins’ and as it turns out, Plugins can’t really function unless they are part of a Package. In it’s simplest form, a Package in v5 is a folder which contains Plugins that exists in the &lt;strong&gt;~/Plugins/Packages&lt;/strong&gt; sub folder. The folder name of the package becomes very important because it is used in setting up the routes to&amp;#160; create the unique URLs which map to the MVC Controller plugins. Package developers should be aware that they should name their folder to something that is reasonably unique so it doesn’t overlap with other Package folder names. During package installation, Jupiter will check for uniqueness in Package folder names to ensure there is no overlap (&lt;em&gt;there will be an entirely separate post on how to create deployment packages and how to install them&lt;/em&gt;).&lt;/p&gt;  &lt;p&gt;Here’s a quick example: If I have a Package that contains a &lt;em&gt;Tree &lt;/em&gt;plugin called &lt;em&gt;TestTree&lt;/em&gt; (which is in fact an MVC Controller) and I’ve called my Package folder ‘&lt;em&gt;Shazwazza’&lt;/em&gt;, which exists at &lt;strong&gt;~/Plugins/Packages/Shazwazza &lt;/strong&gt;then the URL to return the JSON for the tree is: &lt;a href="http://localhost/Umbraco/Shazwazza/Trees/TestTree/Index"&gt;http://localhost/Umbraco/Shazwazza/Trees/TestTree/Index&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Similarly, if I have a &lt;em&gt;Editor&lt;/em&gt; plugin called &lt;em&gt;TestEditor &lt;/em&gt;with an action called &lt;em&gt;Edit&lt;/em&gt;, then a URL to render the Edit Action is:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://localhost/Umbraco/Shazwazza/Editors/TestEditor/Edit"&gt;http://localhost/Umbraco/Shazwazza/Editors/TestEditor/Edit&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If you’ve worked with MVC, you’ll probably know what an &lt;a href="http://msdn.microsoft.com/en-us/library/ee671793.aspx" target="_blank"&gt;MVC Area&lt;/a&gt; is. The way that Jupiter creates the routes for Packages/Plugins is by creating an MVC Area for each Package. This is how it deals with the probability that different Package developers may create MVC Controllers with the same name. MVC routes are generally based just on a Controller name and an Action name which wouldn’t really work for us because there’s bound to be overlap amongst Package developers, so by creating an Area for each Package the route becomes unique to a combination of Controller name, Action name and Area name.&amp;#160; MVC also determines where to look for Views based on Area name which solves another issue of multiple Packages installed with the same View names.&lt;/p&gt;  &lt;h1&gt;Whats next?&lt;/h1&gt;  &lt;p&gt;In the coming blog posts I’ll talk about &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;how plugins are installed and loaded &lt;/li&gt;    &lt;li&gt;how and where the Views are stored that the plugins reference &lt;/li&gt;    &lt;li&gt;how to create all of the different types of plugins &lt;/li&gt; &lt;/ul&gt;  &lt;h1&gt;Code Garden 2011&lt;/h1&gt;  &lt;p&gt;I’ll be doing a talk on &lt;a href="http://codegarden11.com/sessions/day-2/slot-one/get-plugged-in-to-umbraco-jupiter.aspx" target="_blank"&gt;Plugins for Umbraco Jupiter&lt;/a&gt; at &lt;a href="http://codegarden11.com/" target="_blank"&gt;Code Garden 2011&lt;/a&gt; this year which will go in to a lot more detail than these blog posts. If you are attending Code Garden already, then hopefully this series will give you a head start on Umbraco v5. If you haven’t got your tickets to Code Garden yet, what are you waiting for?! We have so much information to share with you :)&lt;/p&gt;</description>
      <pubDate>Thu, 23 Mar 2023 15:08:09 Z</pubDate>
      <a10:updated>2023-03-23T15:08:09Z</a10:updated>
    </item>
  </channel>
</rss>