Indexing and searching business entities using Lucene.Net Framework, part 2

Conception using generics and reflection of a search engine to index and search content in your business entities without being intrusive.

Part 1 is available following this link Indexing and searching business entities using Lucene.Net Framework, part 1

Lucene.Net presentation

Lucene.Net is an open source project coming from the Java world currently incubating at the Apache Software Foundation (ASF). It is a source code port on the .NET platform using C#, done class-by-class, API-per-API, of the indexing and searching engine algorithms of Java Lucene.

Apache Lucene is an efficient indexing and searching engine for text data. However it is not offering integrated support for document like Office Word or PDF, you need to use extensions able to extract the text content of a document in order to be able index it. This is also mandatory for markup documents like HTML.

Lucene.Net follows scrupulously the APIs defined in the classes of the original Lucene Java version. The API names as well as the class names are preserved with the intention to follow naming guidelines of the C# language. For example, the method Hits.length() of the Java implementation is written Hits.Length() in its C# version.

Like the port of the APIs and the classes in C#, the algorithm of the Java version of Lucene is also ported in the C# version. This means that an index created using the Java version of Lucene is 100% compatible with it C# version, in reading, writing and updating. Therefore two processes, one written in Java and the other in C#, could achieve concurrent searches using the same index.

You might consult the documentation of the last stable version, version 2.0, on the following page. To download the last stable version browse to this page. To get more information about Lucene I recommend using the pages dedicated to the Java version of Lucene which are much more consistent.

Lucene.Net Architecture

Lucene.Net Architecture

The lower layer is the data access layer (Storage). Then, the upper layer is about accessing the index files (data access). This layer is used by the indexing system and the searching system. On top of those we find a layer for searching and a search request parser layer used by the searching part of Lucene.Net. Identically we found a parser layer and a document layer used for the indexation part of Lucene.Net.

To get more information about Lucene I recommend reading the presentation on Lucene website.

Now that we got a better view on what is Lucene.Net about we will see in the next part how we will use it to index the properties of our business entities.

This post is cross-posted on innoveo blog and in French on my .NET community portal Tech Head Brothers.


Nice Resharper 4 feature

Today I am developing for my company innoveo solutions, and hope to be able to tell you on what soon ;-)

I came accross this great new feature of JetBrains ReSharper 4, read more about all features on this page.

I used there:

  • Object and collection initializers
  • Implicitly typed locals and arrays
  • Code Cleanup

I will soon have to tell more about the usage of JetBrains Team City by innoveo solutions and personally!


ScrumWorks Pro integration with Java & .NET

Today at innoveo we had a great meeting in which I made an introduction of Scrum to the whole team! The presentation and the Scrum methodology got a great feedback, and I am very happy about that. We were already using for some years now some key points of Scrum without really knowing it. Now we know it and we will use some more advantages that comes out of it.

My colleague Lorenz challenged me just after the meeting showing me a unit test he made in Java in which he was calling the ScrumWorks Pro back-end for an integration idea we had.

From danube website:

ScrumWorks™ Pro is a collaborative system that allows teams, product owners, and stakeholders to manage the Scrum lifecycle at the program, product, release and sprint levels. Scrumworks™ Pro offers role-based project tracking, and reporting features that support the ScrumMaster, Scrum Team and Product Owner by encouraging Scrum best practices.

Back home this evening I had to give it a try with .NET (What else! ;)

And here is the first result:

So I am also able to call the ScrumWorks Pro back-end but with .NET Framework 3.5 and a WCF client. Cool! That gives me some more great integration ideas!


Launch of innoveo solutions blog

A few seconds ago Didier and I just launched innoveo solutions blog.

If you ask yourself what is innoveo solutions, it is my new company and you might read more about it here:

New start on next Monday

Today was my last day at ecenter solutions (Helvetia)

I am delighted about this announce because I had the pleasure to develop it with my colleague Roy, a very nice experience that will go on. We used Scrum project management methodology and with some experience now I have to say that I am really convince about it.

In the future I will for sure continue to post on my own blog but will cross-post some of my posts on innoveo blog.


Early wakes up to get at Le Web 3 '07 in Paris

I arrived this morning really early at the conference Le Web 3 '07 with Didier.

As you can see on Didier's shot there were not that much people in the room:

More pictures on Didier's post leweb3 is starting!

We will be there till Thursday mid-day, so if anybody wants to meet in Paris, please feel free to contact me.

By the way normally there should be an announcement concerning innoveo.


Linked files in Visual Studio projects

Following my post "Visual Studio and PowerShell Trick" I had another little issue, I have one mapping file, mapping.xml, that I want to use on my website and with my data access layer unit tests project.

I used to solve this using the linked file possibility of Visual Studio. Point the target folder, and click Add Existing item, browse to your source folder, choose the original file, and at the bottom of the dialog you will have the Add button showing a dropdown, you juste then need to use Add As Link.

Now I have the same mapping file used in both locations.



And I can run and watch the results of my unit tests happily!


Visual Studio and PowerShell Trick

This end of afternoon I worked on the mapping part of my new project for innoveo solutions, a blog engine.

Till now I was using the XML Persistence Engine of Euss but it was time to go to a real mapping and a database.

I ended up with some .bat file in my solution.

For example diffMapping.bat uses WinMerge to compare the mapping I currently use to one that I just generated out of my Domain assembly.

Then I wanted to be able to run this .bat script from the IDE, without having it in Visual Studio 2005 External Tools menu (not tried with 2008 currently). So I tried the right click on the .bat Open With, then gave the path of cmd.exe. That's was not working, it just opened a cmd prompt.

Then I pointed Open With to PowerShell exe and it works!!! It will run you .bat file from Solution Explorer. You can even define it as the default program for .bat and double clicking on a .bat file in Solution Explorer will run it.

Nice no ?!


innoveo solutions new office almost ready!

On Friday I was doing home office but it seems that our new innoveo solutions office went a step further!

Didier took some pictures of our new office in Zurich! We will move there end of this month!

innoveo solutions new office

innoveo solutions new office

Really nice place to work, and move will be much easier because we move from 6th floor to 2nd! Nevertheless I will miss the view to the Swiss Alps!


Le Web 3 in Paris

Le Web 3 '07I will be in Paris for Le Web 3 '07 from Monday 10 December 2007 evening to Thursday 13 December 2007 mid-day.

I will attend the conference with Didier which was to the 2005 and 2006 editions.

We will travel with the TGV, if there are no strikes at that time and will be staying at the hotel Daunou Opera.

If you want to meet during that time just send me an email.

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect, certified Scrum Master and Founding Member.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status


This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List