Lucene.NET is a source code, class-per-class, API-per-API, algorithmic port of the Java Lucene search engine to the C# and .NET platform utilizing the Microsoft .NET Framework and .NET Standard. NOTE: You should almost always include the [lucene] tag when using this one. The Lucene.NET design is similar to its Java counterpart and you are more likely to get a satisfactory answer when it is included.
Questions tagged [lucene.net]
1845 questions
6
votes
0 answers
Distributed Lucene.net search (sharding?) with Akka.Cluster?
Building a web application distributed over several nodes in a cluster, I want to explore wether we can do content search (not full-text search but data queries) using Lucene.net.
From what I can see, constructing an Akka.net-based cluster of Actors…
user3638471
6
votes
1 answer
How to store multiple distinct types of documents in Lucene
I have an existing Lucene store with many millions of documents, each one representing metadata for an entity. I have a few Id fields (Id1, Id2 .. Id5) and each document can have zero or many values for this field. The index is only ever queried by…

andrewjsaid
- 489
- 3
- 11
6
votes
1 answer
How do I get Lucene (.NET) to highlight correctly with wildcards?
I am using the Lucene.NET API directly in my ASP.NET/C# web application. When I search using a wildcard, like "fuc*", the highlighter doesn't highlight anything, but when I search for the whole word, like "fuchsia", it highlights fine. Does Lucene…

Scott Stafford
- 43,764
- 28
- 129
- 177
6
votes
2 answers
In a Lucene / Lucene.net search, how do I count the number of hits per document?
When searching a bunch of documents, I can easily find the number of documents which match my search criteria:
Hits hits = Searcher.Search(query);
int DocumentCount = hits.Length();
How do I determine the total number of hits within the documents?…

Keltex
- 26,220
- 11
- 79
- 111
6
votes
2 answers
Upgrading sitecore 6.6 index configuration to sitecore 7 (using ComputedFields)
Sitecore CMS+DMS 6.6.0 rev.130404 => 7.0 rev.130424
In our project we have been using AdvancedDatabaseCrawler (ADC) for our indexes (specially because of it's dynamic fields feature). Here's a sample index configuration:

ravinsp
- 4,150
- 2
- 32
- 43
6
votes
5 answers
How do I rebuild a custom Lucene index on a Sitecore content delivery server?
The custom Lucene index on my Sitecore 6.2 Content Delivery server seems to be not right. So I think I need to rebuild all 3 of my custom indexes. How do I do that? Do I just have to use the shared source Index Viewer module? Right now I have…

Corey Burnett
- 7,312
- 10
- 56
- 93
6
votes
2 answers
Lucene.Net QueryParser throws an IOException (read past eof)
I have the following code, where I pass a search value and an analyzer:
private static Query Query(string searchValue, StandardAnalyzer analyzer)
{
var queryParser = new QueryParser(Version.LUCENE_30, "Data", analyzer);
return…

Jerry
- 1,762
- 5
- 28
- 42
6
votes
1 answer
Storing relational data in a Lucene.NET index
I'm currently trying to implement a Lucene.NET based search on a large database and I've hit a snag trying to do a search on what is essentially relational data.
At a high level the data I'm trying to search is grouped, each item belongs to 1 to 3…

fyjham
- 7,004
- 2
- 32
- 40
6
votes
2 answers
Can someone explain to me what this GetCardinality method is doing?
I've been looking into faceted search with Lucene.NET, I've found a brilliant example here which explains a fair amount, apart from the fact that it completely overlooks the function which checks the cardinality of items in a bit array.
Can anyone…

John_
- 2,931
- 3
- 32
- 49
6
votes
3 answers
How far behind the original is Lucene.Net?
I've noticed that Lucene recently released v2.9 (on 25th September this year - 2009), whereas Lucene.Net appears to be v2.0 (released back in 2007):
Does the v2.0 of Lucene.net correspond to the features found in v2.0 of the original Apache…

Justin
- 84,773
- 49
- 224
- 367
6
votes
2 answers
Get TermAttribute in TokenStream Lucene.Net
I use Lucene.NET3.0.3
how to get TermAttribute.I try my best but i can't get it
here source:
Analyzer analyzer = new Lucene.Net.Analysis.Snowball.SnowballAnalyzer(Lucene.Net.Util.Version.LUCENE_30, "English",stopword);
TokenStream…

NetS
- 63
- 4
6
votes
1 answer
Storing List of Strings in Lucene.NET
I am working on a project that relies on Lucene.NET. Up to this point, I have had a class that had simple name/value properties (like int ID { get; set; }). However, I now need to add a new property to my index. The property is a type of List. Up to…

Eels Fan
- 2,043
- 6
- 22
- 23
6
votes
3 answers
How to customize Lucene.NET to search for words with symbols without case-sensitivity (e.g. "C#" or ".net")?
The standard analyzer does not work. From what I can understand, it changes this to a search for c and net
The WhitespaceAnalyzer would work but it's case sensitive.
The general rule is search should work like Google so hoping it's a configuration…

Kumar
- 10,997
- 13
- 84
- 134
6
votes
1 answer
Why is Lucene.Net indexer throwing a System.IO.IOException was unhandled?
The exception is thrown up at times saying the file write.lock cannot be used as it is being used by another process, however this is a very simple test app for Lucene.Net and there's no other process using it, any idea of how this may be
The…

Kumar
- 10,997
- 13
- 84
- 134
6
votes
1 answer
Hits Object Deprecated in Lucene.Net 3.03, how do i replace it?
I am working my way through lucene and been stumped on this issue with the Hits object. I have a Using Lucene.Net.Search but for some reason the VS12 Express cannot find the Hits object so the following fails to compile.
The compiler complains…

TheCodeNovice
- 750
- 14
- 35