Picture of Fabian Holtermann
Software Engineer, Sitecore Certified Trainer & Expert

Sitecore 7 Content Search

I used to have a lot of trouble with the integration of Lucene into Sitecore in previous iterations.
The configuration was difficult and many things were missing. Did you ever try to search in Japanese? No? Well, there is no need to try, because it just won't work without a custom implementation.

Let’s not longer talk about the past but focus on the current situation. Sitecore has done an incredibly good job with the implementation of new features in Sitecore 7.

So what's new in Sitecore 7?
  1. LINQ –You are now able to write your searches accordingly to normal LINQ logic.
  2. POCOs – You will get every result you want, with the custom mapping of Sitecore. Just write your class and Sitecore will map the properties for you.
  3. Standard Index – Sitecore 7 comes with an index for each database and they are pretty reliable and useful. 
  4. Updateable – You are now able to switch to other Lucene versions. Sitecore is no longer married to one Lucene Version. Keep in mind that you still have to use Lucene .NET
  5. Changeable – You don’t have to use Lucene, you can implement whatever you like.
  6. Scalable – If you have a large multiserver site, you should definitely use SOLR in combination with Sitecore7. Simply bercause SOLR can automatically distribute queries in a cluster setup.
  7. Config – No more spaghetti code mess, just simple steps will instantly get you the desired results.
  8. Custom Analyzer – You can attach your own analyzer for one language or just for one field for as many languages or fields as you wish.
  9. Fields – There is much more flexibility to it. Define how it will be crawled or saved. You can even boost a field to get it up in the result set.
  10. Future – The future looks bright. They are planning on implementing a lot more functionality. For example: spelling correction or auto suggest, auto mapping for complex field types and much more.

To get you motivated to play with it, here is a little example of how to use the index:

var index = ContentSearchManager.GetIndex("sitecore_master_index");
using (var context = index.CreateSearchContext())
     IQueryable<SearchResultItem> searchItems = context.GetQueryable<SearchResultItem>();
     searchItems = searchItems.Where(item => item.Content.Like (SearchTerm));

That’s it for today. Good luck with your search!

Es wurden noch keine Kommentare zu diesem Eintrag geschrieben.
Kommentar hinzufügen
Vor und Zuname
E-Mail bei weiteren Kommentaren
Mein Kommentar