PDF indexing support in UmbracoExamine using PdfPig
Install with Nuget:
dotnet add package UmbracoExamine.PDF
You will then have a new Examine index called "PDFIndex" available.
To use the MultiSearcher in V10, you can instantiate it when needed like:
using(var multiSearcher = new MultiIndexSearcher("MultiSearcher", new IIndex[] {
Constants.UmbracoIndexes.ExternalIndexName,
PdfIndexConstants.PdfIndexName
}))
{
...
};
Or you can register a multi-index searcher with the ExamineManager on startup like:
public class Startup
{
...
public void ConfigureServices(IServiceCollection services)
{
...
services.AddExamineLuceneMultiSearcher("MultiSearcher", new string [] {
Constants.UmbracoIndexes.ExternalIndexName,
PdfIndexConstants.PdfIndexName
});
}
...
}
With this approach, the multi searcher will show up in the Examine dashboard and it can be resolved from the ExamineManager like:
if (_examineManager.TryGetSearcher("MultiSearcher", out var searcher))
{
//TODO: use the `searcher` to search
}
Uses SQLite and the db is part of git.
Username: [email protected] Password: 1234567890
The source code for UmbracoExamine.PDF is licensed under the MIT license.