![]() |
Web Development »
ASP.NET »
Samples
Beginner
License: The Code Project Open License (CPOL)
Lucene.net in asp.net simple exampleBy mascixHow to use lucene.net api from c# in asp.net enviroment |
C#, ASP.NET, Dev
|
||||||||
|
Advanced Search |
|
|
|
||||||||||||||||
Lucene.Net is a source code, class-per-class, API-per-API and algorithmatic port of the Java Lucene search engine to the C# and .NET platform utilizing Microsoft .NET Framework. And this is a very simple asp.net example to show how you can call Lucene API. This example creates lucene index and makes a search on it.
It would be nice if you already used lucene before but there is no need to dig into that java world. this example stands for that.
When you start using lucene you need to check is the Index exist or not this function will help you to cover that area.
private void IsIndexExists(out bool created, string sIndexPath) { created = false; if (!IndexReader.IndexExists(sIndexPath)) { IndexWriter writer = new IndexWriter(sIndexPath, new StandardAnalyzer(), true); created = true; writer.Close(); } }
this is not a full of code example. this is the simplest way to use pure lucene.net API from asp.net that is why you should download the code and check it out.
20/10/2008 for the turkish version of this article blog.
| You must Sign In to use this message board. | |||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
|
|||||||||||||||
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 19 Oct 2008 Editor: |
Copyright 2008 by mascix Everything else Copyright © CodeProject, 1999-2009 Web09 | Advertise on the Code Project |