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
17
votes
1 answer
Lucene.Net Search result to highlight search keywords
I use Lucene.Net to index some documents. I want to show the user a couple of lines as to why that document is in the result set. just like when you use google to search and it shows the link and followed by the link there are a few lines with the…

Ali Shafai
- 5,141
- 8
- 34
- 50
17
votes
3 answers
Implement Lucene on Existing .NET / SQL Server stack with multiple webservers - store indexes in the database?
This article offered me a huge amount of information:
Implement Lucene on Existing .NET / SQL Server stack with multiple webservers
I'd like to follow on from this by asking about the notion of implementing a Lucene Directory that would persist the…

user206830
- 189
- 7
16
votes
3 answers
Does Lucene.Net manage multiple threads accessing the same index, one indexing while the other is searching?
When using Lucene.Net with ASP.NET, I can imagine that one web request can trigger an update to the index while another web request is performing a search. Does Lucene.Net have built in it the ability to manage concurrent access, or do I have to…

Corey Trager
- 22,649
- 18
- 83
- 121
16
votes
3 answers
Synonyms using Lucene
What is the best way to handle synonyms (phrases) using Lucene?
Especially, when I need to execute queries like :a OR b OR c NOT d
How about adding a new field called "synonyms" to each document while indexing?
This field's value would have a list…

Ed.
- 1,654
- 7
- 20
- 33
15
votes
1 answer
Using RAMDirectory
When should I use Lucene's RAMDirectory? What are its advantages over other storage mechanisms? Finally, where can I find a simple code example?

Jimmy
- 2,106
- 12
- 39
- 53
15
votes
2 answers
Are there any recommendations for integrating Lucene.NET into an ASP.NET MVC application?
I'm wondering if there are any recommendations, best practises or top-tips for integrating a Lucene.NET based search into an ASP.NET MVC web application?
Things I've read (or think I've read) in various places include the following:
One…

Kieron
- 26,748
- 16
- 78
- 122
15
votes
1 answer
Azure Search: price range - min & max value calculation
Currently, I am trying out Azure Search SDK. Having a strong background working with lucene and bobobrowse, the Azure Search is quite fantastic and has a lot of features from both frameworks out of the box.
The only thing I am puzzling with is to…

Sneijder
- 319
- 1
- 11
15
votes
2 answers
How do i implement tag searching? with lucene?
I havent used lucene. Last time i ask (many months ago, maybe a year) people suggested lucene. If i shouldnt use lucene what should i use? As am example say there are items tagged like this
apples carrots
apples
carrots
apple banana
if a user…
user34537
15
votes
2 answers
How to enable stemming when searching using lucene.net?
How to enable stemming when searching using lucene.net?

devson
- 990
- 8
- 22
14
votes
5 answers
Syncing Lucene.net indexes across multiple app servers
we are designing the search architecture for a corporate web application. We'll be using Lucene.net for this. The indexes will not be big (about 100,000 documents), but the search service must be always up and always be up to date. There will be new…

axel_c
- 6,557
- 2
- 28
- 41
13
votes
6 answers
Directory lock error with Lucene.Net usage in an ASP.NET MVC site
I'm building an ASP.NET MVC site where I want to use Lucene.Net for search. I've already built a SearchController and all of its methods, but I'm getting an error at runtime that occurs when the SearchController is first initialized.
In…

Maxim Zaslavsky
- 17,787
- 30
- 107
- 173
13
votes
3 answers
Thread safe queue (list) in .net
I need to create a thread safe list of items to be added to a lucene index.
Is the following thread safe?
public sealed class IndexQueue
{
static readonly IndexQueue instance = new IndexQueue();
private List items = new…

Ben Foster
- 34,340
- 40
- 176
- 285
13
votes
3 answers
In lucene.net can we search for a content without giving field name..and it will search in all fields that are indexed?
In lucene.net can we search for a content without giving field name..and it will search in all fields that are indexed.

devson
- 990
- 8
- 22
12
votes
2 answers
Avoid removal of current Lucene.NET index during rebuild
I'm new to Lucene.NET but I'm using an open source tool built for Sitecore CMS that uses Lucene.NET to index lots of content from the CMS. I confirmed yesterday that when I rebuild my indexes, the current index files wipe clean so anything that…

Mark Ursino
- 31,209
- 11
- 51
- 83
12
votes
2 answers
Elasticsearch, Nest and Lucene.net
I know that Elasticsearch is based on Lucene but I wonder if Elasticsearch gives me any benefits developing a search engine rather than coding with Lucene.Net directly. Sorry, If question is a bit simple but I am confusing after searching the…

Emil
- 6,411
- 7
- 62
- 112