Sitecore 7, Lucene 3.0 and Highlighted results

For all you that will use Lucene 3.0 under Sitecore 7 and want to highlight your results using Luce.Net.Contrib libraries, let me save you a whole lot of time. On Lucene.net page http://lucenenet.apache.org/ you will find a reference to the above mentioned package which i used for retrieving highlighted results from my Lucene index. All nice and smooth until i performed the search and stuck with this error for 3 days: ...

November 29, 2013 · 1 min · ap

Lucene: Indexing DateTime from Sitecore and querying date ranges

The title should be self explanatory. I need to index some sitecore items that represent some entities that are valid to the public between certain dates. The sitecore fields are date time fields looking like this. I needed a solution for indexing these values in a way that i can do range queries on them. I used the UnixTimeStamp for converting the DateTime field in a UnixTimeStamp field. public static string ConvertToUnixTimeStamp(DateTime value) { var date = new DateTime(1970, 1, 1, 0, 0, 0, value.Kind); var unixTimestamp = Convert.ToInt64((value - date).TotalSeconds); return unixTimestamp.ToString(CultureInfo.InvariantCulture); } Decoding UnixTimeStamp to DateTime : ...

October 29, 2013 · 1 min · ap