Just like the other days I was talking to a good friend of mine about performance issues he had lately. And, all of the sudden, seem like he recall something very important and he asked me, do you know any alternative to SQL Server Full Text Search? It should support wildcards and should be faster than SQL Server Full Text Search!! When he asked me this question, I understand it, immediately, he is upto introduce me somthing really interesting. The answer was – Lucene Index. Let us try to understand little more about Lucene Index and how it works based on my discussion with my friend.
What is Lucene Index?
Lucene Index is simple and powerful Java Search library. It is open source project. Lucene can be used in many type of projects. Lucene is a high performance library used to index and search almost any kind of text. Lucene can be implemented for various sources like SQL, NoSQL a file system and many more. This is a product of Apache
How Lucene Index works?
Lucene Index work in a different way. Normally, a search is performed on a text whereas Lucene searches an Index. It exactly relates to a search we do in a physical book where we search for an word or key phrase in the Appendix section and jump directly to the page where it was written. This type of index is called an inverted index.
Internally, it will create a Document which is the unit of search and index. Further, inside of this Document there are one more fields. This field contains the value.
I am still in reading more on this subject, but I thought it is a good idea to write a short note on this vary topic as it is really very interesting. It helped my friend improving search ability for his application he wrote in .Net. He mentioned that the outcome is far more better than what it was with Full Text Search. He gave me few links that I may read on Lucene Index, let me put them all here so that you can also read.
- Lucene Tutorial
- Lucene Syntax
- Lucene Overview
- Lucene .Net with Azure SQL
- Indexing Databases with Lucene
- Apache Solr a user friendly search
I hope you liked this blog post. It is a good idea to know if any one of you have already used Lucene and how your experience is? Any input is greatly appreciated.Just in case, if you are in serch of Full Text Search service issue, you may want to read my blog post.