Apache Lucene.Net is a .NET full-text search engine framework, a C# port of the popular Apache Lucene project. Apache Lucene.Net is not a complete application, but rather a code library and API that can easily be used to add search capabilities to applications.
The Apache Lucene.Net web site is at: http://lucenenet.apache.org
- .NET Framework 4.0
- .NET Framework 3.5
- .NET Standard 2.0
- .NET Standard 1.6
- .NET Framework 4.5
Latest Stable Version: Lucene.Net 3.0.3
Working toward Lucene.Net 4.8.0 (currently in BETA)
PM> Install-Package Lucene.Net
- Lucene.Net - Core library
- Lucene.Net.Contrib - Various user contributed functionality and extras
- Lucene.Net.Contrib.Spatial - Geospatial Search
- Lucene.Net.Contrib.Spatial.NTS - Geospatial search with support for NetTopologySuite.
PM> Install-Package Lucene.Net -Pre
- Lucene.Net - Core library
- Lucene.Net.Analysis.Common - Analyzers for indexing content in different languages and domains
- Lucene.Net.Analysis.Kuromoji - Japanese Morphological Analyzer
- Lucene.Net.Analysis.Phonetic - Analyzer for indexing phonetic signatures (for sounds-alike search)
- Lucene.Net.Analysis.SmartCn - Analyzer for indexing Chinese
- Lucene.Net.Analysis.Stempel - Analyzer for indexing Polish
- Lucene.Net.Benchmark - System for benchmarking Lucene
- Lucene.Net.Classification - Classification module for Lucene
- Lucene.Net.Codecs - Lucene codecs and postings formats
- Lucene.Net.Expressions - Dynamically computed values to sort/facet/search on based on a pluggable grammar
- Lucene.Net.Facet - Faceted indexing and search capabilities
- Lucene.Net.Grouping - Collectors for grouping search results
- Lucene.Net.Highlighter - Highlights search keywords in results
- Lucene.Net.ICU - Specialized ICU (International Components for Unicode) Analyzers and Highlighters
- Lucene.Net.Join - Index-time and Query-time joins for normalized content
- Lucene.Net.Memory - Single-document in-memory index implementation
- Lucene.Net.Misc - Index tools and other miscellaneous code
- Lucene.Net.Queries - Filters and Queries that add to core Lucene
- Lucene.Net.QueryParser - Text to Query parsers and parsing framework
- Lucene.Net.Replicator Files replication utility
- Lucene.Net.Sandbox - Various third party contributions and new ideas
- Lucene.Net.Spatial - Geospatial search
- Lucene.Net.Suggest - Auto-suggest and Spellchecking support
We don't yet have API documentation for Lucene.Net 4.8.0, but the API is similar to Lucene 4.8.0.
NOTE: We are working on this, but could use more help since it is a massive project. See #206.
There are several demos implemented as simple console applications that can be copied and pasted into Visual Studio or compiled on the command line in the Lucene.Net.Demo project.
Lucene.Net is a very large project (over 400,000 executable lines of code and nearly 1,000,000 lines of text total) and we welcome any and all help to maintain such an effort. Read our Contribution Guide or read on for ways that you can help.
If you have a general how-to question or need help from the Lucene.Net community, please email the Apache Lucene.Net-User mailing list by sending a message to:
We recommend you join the user mailing list to stay looped into all user discussions.
Alternatively, you can get help via StackOverflow.
Please do not submit general how-to questions to JIRA, use JIRA for bug reports/tasks only.
To report a bug, please use the JIRA issue tracker. You can signup for a JIRA account here (it just takes a minute).
To start a development discussion regarding technical features of Lucene.Net, please email the Apache Lucene.Net-Developer mailing list by sending a message to:
We recommend you join both the user and dev mailing lists to stay looped in to all user and developer discussions.
Before you start working on a pull request, please read our Contributing guide.
If you plan to submit multiple pull requests, please submit an Individual Contributor License, or for individual pull requests, just submit the request and in the description state that the code is your original work and you license it under the Apache License v2.
Building on the Command Line is only supported on Windows.
- Powershell 3.0 or higher (see this question to check your Powershell version)
- .NET Core SDK 2.0 or higher
To build the source, clone or download and unzip the repository. From the repository root, execute:
> build [options]
Short | Long | Description | Example |
---|---|---|---|
‑config | ‑‑Configuration | The build configuration ("Release" or "Debug"). | build ‑‑Configuration:Debug |
‑pv | ‑‑PackageVersion | The NuGet package version. If not supplied, will use the version from the Version.proj file. | build ‑pv:4.8.0‑beta00001 |
‑t | ‑‑Test | Runs the tests after building. Note that testing typically takes upwards of 2 hours. | build ‑t |
‑v | ‑‑Version | The assembly file version. If not supplied, will use the PackageVersion (excluding any pre-release tag). | build ‑pv:4.8.0‑beta00001 ‑v:4.8.0 |
NuGet packages are output by the build to the /release/NuGetPackages/
directory. Test results (if applicable) are output to the /release/TestResults/
directory.
You can setup Visual Studio to read the NuGet packages like any NuGet feed by following these steps:
- In Visual Studio, right-click the solution in Solution Explorer, and choose "Manage NuGet Packages for Solution"
- Click the gear icon next to the Package sources dropdown.
- Click the
+
icon (for add) - Give the source a name such as
Lucene.Net Local Packages
- Click the
...
button next to the Source field, and choose the/src/release/NuGetPackages
folder on your local system. - Click Ok
Then all you need to do is choose the Lucene.Net Local Packages
feed from the dropdown (in the NuGet Package Manager) and you can search for, install, and update the NuGet packages just as you can with any Internet-based feed.
- Visual Studio 2017 version 15.3 or higher
- .NET Core SDK 2.0 or higher
- NUnit3 Test Adapter
- Open
Lucene.Net.sln
in Visual Studio. - Choose the target framework to test by opening
build/TestTargetFramework.proj
and uncommenting the corresponding<TargetFramework>
. - Build a project or the entire solution, and wait for Visual Studio to discover the tests - this may take several minutes.
- Run or debug the tests in Test Explorer, optionally using the desired filters.
NOTE: When running tests in Visual Studio, be sure to set the default processor architecture to 64 bit to avoid running out of virtual memory on some tests.