Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AndrewSwerlick 5 posts 25 karma points
    Mar 26, 2014 @ 18:24
    AndrewSwerlick
    0

    Searching multiple indexes in umbraco 7

    This post from 2 years ago mentions a multiple index set Examine Search Provider.

    http://our.umbraco.org/forum/developers/extending-umbraco/18956-Searching-multiple-indexes-with-Examine

    Is this provider still around? If so is there any documentation on setting it up? I can't find it in the github site for examine

    https://github.com/Shandem/Examine

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Mar 26, 2014 @ 19:10
    Ismail Mayat
    0

    Andrew,

    It should still be there and to use in code :

     private MultiIndexSearcher searcher;
    
    searcher = WebHelpers.GetMultiSearcher(new[] {"idnex1", "index2"});
    
            public static MultiIndexSearcher GetMultiSearcher(string[] indexes)
        {
            var directories = new List<DirectoryInfo>();
            foreach (var index in indexes)
            {
                var indexer = ExamineManager.Instance.IndexProviderCollection[index];
                var dir = new DirectoryInfo(((LuceneIndexer)indexer).LuceneIndexFolder.FullName.Replace("\\Index",""));
                directories.Add(dir);
    
            }
            var i = new MultiIndexSearcher(directories, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_29));
            return i;
        }
    
  • AndrewSwerlick 5 posts 25 karma points
    Apr 01, 2014 @ 04:05
    AndrewSwerlick
    0

    Yeah I ended up finding it, it was just in a different folder from what I thought. Here it is for others

    https://github.com/Shandem/Examine/tree/master/Projects/Examine/LuceneEngine/Providers

    It's very easy to use within configuration.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies