Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,every body
I'm one question about lucene.net in asp.net core 2.2.
How to using lucene in asp.net core,Please advice me, if possible.
Thanks.
[BEST REGARDS]

What I have tried:

I'm searching in web for a long time,but can not find any proper article.
Posted
Updated 27-Dec-18 7:35am
v2

Go here[^].

See the menu item that says "Useful Links"? Click it. Under there, you'll find "How to get started with Lucene.Net".

Now, one of the biggest problems with Lucene.net is the lack of documentation. Are you sure you want to use a product that isn't documented properly in a production application? I wouldn't.

Now, for .NET Core, there's even less documentation. From what I can see, it's done pretty much in blog posts. You can try to start with Search with Lucene.Net 4.8 (Part 1) - Basic Implementation[^]
 
Share this answer
 
v2
Packt has Lucene 4 Cookbook - PDF eBook | Now just $5[^] and it is on sale. I found this helpful. While it is about the Java version, Lucene.NET is an almost exact port to C#, so it is easy to use the concepts in you code.

Just a warning, Lucene.NET 4.8 is .NET Standard 2.0 and can be easily used in a .NET Core application, but the API is different from the 3.0.3 version, which is not .NET Standard, only .NET Framework 4.6.

However, you can include .NET 4.6 NuGet packages in a .NET Core app and in most cases, they will work fine. I have not run into any issues, so you can ignore the warnings.

Just remember, Lucene.NET is just a library to provide Inverted Indexes and Search functionality, but you have to implement the app and infrastructure that uses it.

There are a number of alternatives that leverage Lucene or Lucene.NET and provide a more complete solution. ElasticSearch and RavenDb are just a couple. Also, many CMS frameworks will include Lucene based Indexing and Search capabilities as modules. Orchard and WordPress come to mind for this.
 
Share this answer
 
Hi, Thanks for all replies.
In fact, I'm going to design autocomplete suggestion,
Also i want customize indexes for every Insert, Update,Delete operation.
And i want change fileds for each time that i create index.
Lucene is very good.i implement this by winform and there is'nt any issue,
But for using lucene in Asp.net Core 2.2, I have problems.
I want simple sample code for this matter.
Be grateful if somebody advise me.
Thanks a lot.
 
Share this answer
 
v2
You can get the demo for the Lucene.NET from Apache's Github account, lucenenet/src/Lucene.Net.Demo at master · apache/lucenenet · GitHub[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900