{
  "CONTRIBUTING.html": {
    "href": "CONTRIBUTING.html",
    "title": "Contributing to Lucent",
    "summary": "Contributing to Lucent Thank you for your interest in contributing to Lucent! We welcome contributions from the community and appreciate your help in making this library better. Getting Started Fork the repository on GitHub Clone your fork locally Create a new branch for your feature or bug fix Make your changes Push to your fork and submit a pull request Development Setup Prerequisites .NET 9.0 SDK or later Visual Studio 2022, JetBrains Rider, or VS Code Git Building the Project dotnet restore dotnet build Running Tests dotnet test Contribution Guidelines Code Style Follow standard C# coding conventions Use meaningful variable and method names Include XML documentation for public APIs Maintain consistency with the existing codebase Pull Request Process Ensure your code builds without warnings Add or update tests for your changes Update documentation if necessary Ensure all tests pass Submit your pull request against the master branch Pull Request Description Please include: A clear description of what your change does Why this change is needed Any breaking changes Steps to test your changes Types of Contributions Bug Reports When filing a bug report, please include: A clear description of the issue Steps to reproduce the problem Expected vs actual behavior Environment details (.NET version, OS, etc.) Sample code that demonstrates the issue Feature Requests For feature requests, please: Explain the use case and why it's needed Describe the proposed solution Consider if it aligns with the library's philosophy of minimal abstraction Discuss potential alternatives Code Contributions We welcome: Bug fixes Performance improvements Documentation improvements New features that align with the library's goals We generally do not accept: Features that add heavy abstraction layers Breaking changes without significant justification Code that significantly increases complexity Philosophy Alignment Remember that Lucent aims to provide minimal abstraction over Lucene.NET while offering idiomatic .NET integration. Contributions should: Maintain direct access to underlying Lucene.NET types Avoid unnecessary wrapper classes Focus on dependency injection and configuration improvements Preserve the performance characteristics of Lucene.NET Code of Conduct Please be respectful and constructive in all interactions. We aim to create a welcoming environment for all contributors. Questions? If you have questions about contributing, feel free to: Open an issue for discussion Start a discussion in the repository Reach out to the maintainers Thank you for contributing to Lucent!"
  },
  "LICENSE.html": {
    "href": "LICENSE.html",
    "title": "",
    "summary": "MIT License Copyright (c) 2024 Lucent Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
  },
  "README.html": {
    "href": "README.html",
    "title": "Lucent",
    "summary": "Lucent A lean, minimalistic .NET library that provides idiomatic integration of Lucene.NET with dependency injection and modern .NET configuration patterns. Overview Lucent is designed to bring Lucene.NET closer to idiomatic .NET best practices while maintaining direct access to the underlying Lucene.NET types and APIs. Unlike heavier abstraction layers, Lucent focuses on providing just what you need: service container integration, configuration management, and lifecycle handling. Key Features Minimal Abstraction: Direct access to Lucene.NET types and APIs Service Container Integration: Native support for .NET dependency injection Idiomatic Configuration: Leverage IConfiguration and options patterns Lifecycle Management: Proper disposal and resource management Lean Design: No unnecessary wrappers or query builders Philosophy Lucent takes a different approach compared to libraries like Examine. While Examine provides extensive abstractions and query builders, Lucent maintains the full power and flexibility of Lucene.NET while simply making it easier to use in modern .NET applications. If you require more high-level abstractions, fluent query builders, we recommend checking out the excellent Examine library. Comparison with Examine Feature Lucent Examine Abstraction Level Minimal High Query Building Direct Lucene.NET Fluent API Learning Curve Requires Lucene.NET knowledge Examine-specific Flexibility Full Lucene.NET power Limited to abstractions Use Case Lucene users Quick implementation Requirements .NET 9.0 or later Lucene.NET 4.8-beta00017 or later Installation dotnet add package Lucent Quick Start using Lucene.Net.Documents; using Lucene.Net.Documents.Extensions; using Lucene.Net.Index; using Lucene.Net.Search; using Lucent.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var builder = Host.CreateApplicationBuilder(args); // Register Lucent index with default configuration (uses RAMDirectory) builder.Services.AddLucentIndex(); var app = builder.Build(); using var scope = app.Services.CreateScope(); // Get the IndexWriter and add a document using var writer = scope.ServiceProvider.GetRequiredService<IndexWriter>(); var document = new Document(); document.AddStringField(\"name\", \"brown fox\", Field.Store.YES); writer.AddDocument(document); writer.Commit(); // Search the index var searcher = scope.ServiceProvider.GetRequiredService<IndexSearcher>(); var query = new PhraseQuery { new Term(\"name\", \"brown fox\") }; var hits = searcher.Search(query, 10); Console.WriteLine($\"Hits: {hits.TotalHits}\"); Usage Basic Index Configuration By default, Lucent uses an in-memory RAMDirectory and StandardAnalyzer. For production use, configure a persistent directory: using Lucene.Net.Store; using Lucent.Configuration; builder.Services.AddLucentIndex(); // Configure to use a file-based directory builder.Services.Configure<IndexConfiguration>(options => options.Directory = new MMapDirectory(new DirectoryInfo(\"index\"))); Custom Analyzer Configure a custom analyzer for your index: using Lucene.Net.Analysis.En; using Lucent.Configuration; builder.Services.Configure<IndexConfiguration>(options => { options.Directory = new MMapDirectory(new DirectoryInfo(\"index\")); options.Analyzer = new EnglishAnalyzer(options.Version); }); Multiple Indices Lucent supports registering multiple named indices using keyed services: using Lucene.Net.Index; using Lucene.Net.Search; using Microsoft.Extensions.DependencyInjection; // Register multiple indices builder.Services.AddNamedLucentIndex(\"products\"); builder.Services.AddNamedLucentIndex(\"customers\"); // Configure each index separately builder.Services.Configure<IndexConfiguration>(\"products\", options => options.Directory = new MMapDirectory(new DirectoryInfo(\"products-index\"))); builder.Services.Configure<IndexConfiguration>(\"customers\", options => options.Directory = new MMapDirectory(new DirectoryInfo(\"customers-index\"))); // Resolve using keyed services using var scope = app.Services.CreateScope(); var productsWriter = scope.ServiceProvider.GetRequiredKeyedService<IndexWriter>(\"products\"); var customersWriter = scope.ServiceProvider.GetRequiredKeyedService<IndexWriter>(\"customers\"); var productsSearcher = scope.ServiceProvider.GetRequiredKeyedService<IndexSearcher>(\"products\"); Available Services When you call AddLucentIndex() or AddNamedLucentIndex(), the following services are registered: IndexWriter (scoped) - For adding, updating, and deleting documents IndexReader (scoped) - For reading the index IndexSearcher (scoped) - For searching the index ITaxonomyWriter (scoped) - For writing facet taxonomies (when FacetsDirectory is configured) TaxonomyReader (scoped) - For reading facet taxonomies (when FacetsDirectory is configured) Configuration Options The IndexConfiguration class supports the following options: public class IndexConfiguration { // The Lucene version to use (default: LUCENE_48) public LuceneVersion Version { get; set; } // The directory where the index is stored (default: RAMDirectory) public Directory Directory { get; set; } // Optional: The directory for storing facet taxonomies public Directory FacetsDirectory { get; set; } // The analyzer to use for text processing (default: StandardAnalyzer) public Analyzer Analyzer { get; set; } // Optional: Custom IndexWriterConfig (auto-created if null) public IndexWriterConfig IndexWriterConfig { get; set; } // Optional: Configuration for faceted search public FacetsConfig FacetsConfig { get; set; } } Faceted Search Lucent supports Lucene.NET's faceted search capabilities through taxonomy-based faceting. This enables features like filtering by categories, brands, or other hierarchical dimensions. Basic Facets Setup Configure facets by setting a FacetsDirectory and optionally a FacetsConfig: using Lucene.Net.Facet; using Lucene.Net.Store; using Lucent.Configuration; builder.Services.AddLucentIndex(); builder.Services.Configure<IndexConfiguration>(options => { options.Directory = new MMapDirectory(new DirectoryInfo(\"index\")); options.FacetsDirectory = new MMapDirectory(new DirectoryInfo(\"facets\")); options.FacetsConfig = new FacetsConfig(); }); Indexing with Facets When facets are configured, inject ITaxonomyWriter along with IndexWriter: using Lucene.Net.Documents; using Lucene.Net.Documents.Extensions; using Lucene.Net.Facet; using Lucene.Net.Facet.Taxonomy; using Lucene.Net.Index; using var writer = scope.ServiceProvider.GetRequiredService<IndexWriter>(); using var taxonomyWriter = scope.ServiceProvider.GetRequiredService<ITaxonomyWriter>(); var facetsConfig = scope.ServiceProvider .GetRequiredService<IOptions<IndexConfiguration>>().Value.FacetsConfig; var document = new Document(); document.AddStringField(\"name\", \"MacBook Pro\", Field.Store.YES); // Add facet fields document.AddFacetField(\"category\", \"Electronics\"); document.AddFacetField(\"brand\", \"Apple\"); // Build the document with facets var builtDoc = facetsConfig.Build(taxonomyWriter, document); writer.AddDocument(builtDoc); writer.Commit(); taxonomyWriter.Commit(); Searching with Facets Use FacetsCollector and TaxonomyReader to retrieve facet counts: using Lucene.Net.Facet; using Lucene.Net.Facet.Taxonomy; using Lucene.Net.Search; var searcher = scope.ServiceProvider.GetRequiredService<IndexSearcher>(); var taxonomyReader = scope.ServiceProvider.GetRequiredService<TaxonomyReader>(); var facetsConfig = scope.ServiceProvider .GetRequiredService<IOptions<IndexConfiguration>>().Value.FacetsConfig; var query = new MatchAllDocsQuery(); var facetsCollector = new FacetsCollector(); FacetsCollector.Search(searcher, query, 10, facetsCollector); // Get facet counts var facets = new FastTaxonomyFacetCounts(taxonomyReader, facetsConfig, facetsCollector); var categoryFacets = facets.GetTopChildren(10, \"category\"); foreach (var facet in categoryFacets.LabelValues) { Console.WriteLine($\"{facet.Label}: {facet.Value}\"); } Drill-Down Queries Filter results by facet values using DrillDownQuery: using Lucene.Net.Facet; var drillDownQuery = new DrillDownQuery(facetsConfig); drillDownQuery.Add(\"category\", \"Electronics\"); var electronicsCollector = new FacetsCollector(); var topDocs = FacetsCollector.Search(searcher, drillDownQuery, 10, electronicsCollector); // Get facet counts for the filtered results var electronicsFacets = new FastTaxonomyFacetCounts( taxonomyReader, facetsConfig, electronicsCollector); For a complete example, see the Facets sample. Working with ASP.NET Core Integrate Lucent in your ASP.NET Core application: var builder = WebApplication.CreateBuilder(args); builder.Services.AddLucentIndex(); builder.Services.Configure<IndexConfiguration>( builder.Configuration.GetSection(\"Lucent\")); // In your controllers or services, inject the required Lucene services public class SearchController : ControllerBase { private readonly IndexSearcher _searcher; public SearchController(IndexSearcher searcher) { _searcher = searcher; } [HttpGet] public IActionResult Search(string query) { var parsedQuery = new TermQuery(new Term(\"content\", query)); var results = _searcher.Search(parsedQuery, 10); return Ok(results); } } Contributing Contributions are welcome! Please read our contributing guidelines and submit pull requests to the develop branch. License This project is licensed under the MIT License - see the LICENSE file for details. Acknowledgments Built on top of the Lucene.NET library Inspired by the simplicity needs not met by existing abstraction layers"
  },
  "SECURITY.html": {
    "href": "SECURITY.html",
    "title": "Security Policy",
    "summary": "Security Policy Supported Versions We provide security updates for the following versions of Lucent: Version Supported Latest ✅ < Latest ❌ As Lucent is currently in early development, we only support the latest released version with security updates. Reporting a Vulnerability If you discover a security vulnerability in Lucent, please report it responsibly by following these steps: How to Report Do not open a public issue on GitHub Report through the security tab Include as much information as possible: Description of the vulnerability Steps to reproduce Potential impact Suggested fix (if available) What to Expect Acknowledgment: We will acknowledge receipt of your report within 48 hours Assessment: We will assess the vulnerability and determine its severity Timeline: We aim to provide a timeline for resolution within 7 days Updates: We will keep you informed of our progress Credit: With your permission, we will credit you in our security advisory Response Timeline Critical vulnerabilities: Patched within 7 days High severity: Patched within 14 days Medium/Low severity: Patched in the next regular release cycle Security Considerations Index Security When using Lucent, be aware that: Index files should be stored securely with appropriate file system permissions Sensitive data should be carefully considered before indexing Access controls should be implemented at the application level Dependencies Lucent relies on: Lucene.NET - We monitor security advisories for the underlying Lucene.NET library .NET Runtime - Ensure you're using supported .NET versions with latest security updates Best Practices When using Lucent in production: Validate input before indexing to prevent injection attacks Sanitize queries from user input Implement proper authentication and authorization Monitor access to index files and directories Regular updates - Keep Lucent and its dependencies updated Secure configuration - Protect configuration files containing sensitive paths Disclosure Policy We will coordinate public disclosure of vulnerabilities Security advisories will be published on GitHub We follow responsible disclosure practices Public disclosure typically occurs after fixes are available Security Contact For security-related inquiries that are not vulnerabilities (questions about best practices, security features, etc.), you can: Open a public issue on GitHub with the \"security\" label Start a discussion in the repository Thank you for helping keep Lucent secure!"
  },
  "docs/api/Lucent.Configuration.IndexConfiguration.html": {
    "href": "docs/api/Lucent.Configuration.IndexConfiguration.html",
    "title": "Class IndexConfiguration",
    "summary": "Class IndexConfiguration Namespace Lucent.Configuration Assembly Lucent.dll The configuration for a specific Lucene.NET index. public sealed class IndexConfiguration Inheritance object IndexConfiguration Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.ReferenceEquals(object, object) object.ToString() Properties Analyzer The Lucene.Net.Analysis.Analyzer to use when creating the index. [Required] public Analyzer? Analyzer { get; set; } Property Value Analyzer Directory The Lucene.Net.Store.Directory where the index will be created. [Required] public Directory? Directory { get; set; } Property Value Directory Remarks If you're testing or don't want to use the disk, use the Lucene.Net.Store.RAMDirectory. FacetsConfig Allows configuring the FacetsConfig used for faceted search. public FacetsConfig? FacetsConfig { get; set; } Property Value FacetsConfig FacetsDirectory Allows configuring the Lucene.Net.Store.Directory used for storing facet information. public Directory? FacetsDirectory { get; set; } Property Value Directory IndexWriterConfig The Lucene.Net.Index.IndexWriterConfig used when creating the Lucene.Net.Index.IndexWriter. If set to null (default), an instance will automatically be created from Version and Analyzer. public IndexWriterConfig? IndexWriterConfig { get; set; } Property Value IndexWriterConfig Version The version of Lucene to use. This MUST match the version used for Analyzer! [Required] public LuceneVersion Version { get; set; } Property Value LuceneVersion"
  },
  "docs/api/Lucent.Configuration.Validation.IndexConfigurationValidator.html": {
    "href": "docs/api/Lucent.Configuration.Validation.IndexConfigurationValidator.html",
    "title": "Class IndexConfigurationValidator",
    "summary": "Class IndexConfigurationValidator Namespace Lucent.Configuration.Validation Assembly Lucent.dll Source generated validator for IndexConfiguration. [OptionsValidator] public class IndexConfigurationValidator : IValidateOptions<IndexConfiguration> Inheritance object IndexConfigurationValidator Implements IValidateOptions<IndexConfiguration> Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Methods Validate(string?, IndexConfiguration) Validates a specific named options instance (or all when name is null). [UnconditionalSuppressMessage(\"Trimming\", \"IL2026:RequiresUnreferencedCode\", Justification = \"The created ValidationContext object is used in a way that never call reflection\")] public ValidateOptionsResult Validate(string? name, IndexConfiguration options) Parameters name string The name of the options instance being validated. options IndexConfiguration The options instance. Returns ValidateOptionsResult Validation result."
  },
  "docs/api/Lucent.Configuration.Validation.html": {
    "href": "docs/api/Lucent.Configuration.Validation.html",
    "title": "Namespace Lucent.Configuration.Validation",
    "summary": "Namespace Lucent.Configuration.Validation Classes IndexConfigurationValidator Source generated validator for IndexConfiguration."
  },
  "docs/api/Lucent.Configuration.html": {
    "href": "docs/api/Lucent.Configuration.html",
    "title": "Namespace Lucent.Configuration",
    "summary": "Namespace Lucent.Configuration Classes IndexConfiguration The configuration for a specific Lucene.NET index."
  },
  "docs/api/Microsoft.Extensions.DependencyInjection.LucentServiceCollectionExtensions.html": {
    "href": "docs/api/Microsoft.Extensions.DependencyInjection.LucentServiceCollectionExtensions.html",
    "title": "Class LucentServiceCollectionExtensions",
    "summary": "Class LucentServiceCollectionExtensions Namespace Microsoft.Extensions.DependencyInjection Assembly Lucent.dll Extensions to registers Lucent's services and configuration. public static class LucentServiceCollectionExtensions Inheritance object LucentServiceCollectionExtensions Inherited Members object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() Methods AddLucentIndex(IServiceCollection, Action<IndexConfiguration>?) Registers Lucene.Net.Index.IndexWriter as a scoped service and allows configuration through IndexConfiguration. public static IServiceCollection AddLucentIndex(this IServiceCollection services, Action<IndexConfiguration>? configure = null) Parameters services IServiceCollection configure Action<IndexConfiguration> Returns IServiceCollection Remarks To register multiple indexes, see AddNamedLucentIndex(IServiceCollection, string, Action<IndexConfiguration>?). AddNamedLucentIndex(IServiceCollection, string, Action<IndexConfiguration>?) Registers Lucene.Net.Index.IndexWriter as a scoped keyed service under indexName and allows configuration through IndexConfiguration. public static IServiceCollection AddNamedLucentIndex(this IServiceCollection services, string indexName, Action<IndexConfiguration>? configure = null) Parameters services IServiceCollection The IServiceCollection to register the services under. indexName string The name of the index to register, this will also serve as the key for services. configure Action<IndexConfiguration> An optional configuration callback. Returns IServiceCollection"
  },
  "docs/api/Microsoft.Extensions.DependencyInjection.html": {
    "href": "docs/api/Microsoft.Extensions.DependencyInjection.html",
    "title": "Namespace Microsoft.Extensions.DependencyInjection",
    "summary": "Namespace Microsoft.Extensions.DependencyInjection Classes LucentServiceCollectionExtensions Extensions to registers Lucent's services and configuration."
  }
}