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;
}
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
Andrew,
It should still be there and to use in code :
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.
is working on a reply...