First in Poland Sitecore Meetup

20 may 2016 will go down in history as day of first in Poland Sitecore meetup.

I have a pleasure to be an organizer of this event. In cooperation with our sponsors (Coders.Center & Sitecore) we are trying to build community of Sitecore users in Poland.

On first meetup our speakers are going to talk about:

  • Sitecore XP – more than CMS – about platform capabilities in support of online marketing (Jakub Koba)
  • Sitecore xDB – Architecture and Configuration (Tomasz Juranek)
  • Sitecore & Gulp as a way of automatization in Siteore projects (Radosław Kozłowski)

If you want to be a part of this event here you can find more information:

Presentations from Meetup:

If you want to join to our community, here you are able to find more information:


Arrow Code

Today i have decided to share with you another well known problem – “the arrow code”.

Many of unexperienced software developers write code in following way:

        do something

In first moment it probably does not look as error but when we would add more logic to this, this code would be very hard to maintain.

That is why you should read this article: click

SOLID architecture principles

Hello again!

Because every day I learn new things and I had been looking for good place to store interesting websites I decided to create new category “Worth To Know” on my blog to share what in my opinion should be shared/promoted in developers community (not only with those who work with Sitecore).

So today I’m giving for you some links about SOLID architecture principles which I try to watch/read once a week to remember how important are they.

  • SOLID architecture principles using simple C# examples by Shivprasad Koirala – website / click
  • SOLID Design Patterns in C# by Free Programming Course – youtube / click

These rules are also important when you work with Sitecore – as you probably know it is also possible to destroy a pleasure of work with Sitecore if code will be done very badly.

Lucene Analyzers for Sitecore – how the tokenized content looks like?

Everyone who have worked with Lucene indexes in Sitecore probably asked one day  him self – “how my content looks after tokenization process?”.

The answer of course is different depending on the type of used analyzer. (About types of analyzers you can read here. I will not provide those information here because it is not in the scope of this post)

Few days ago one of my colleagues (Wojciech Urban – thanks for that!), found the very useful tool which provide us following information:

  1. how tokenized text looks like
  2. how get tokens which are equal to those inside Lucene index

< You can find this tool here >

How tokenized text looks like?

As you can see in the image you are able to insert any description and test the tokenization process results.


You can also change types of analyzers – you can choose from the following list:


With this tool, results of your queries would never surprise you again!

How to get tokens which are equal to those inside Lucene index?

If you need tokens – let say for do something with your search results you can do something like this:

// get the analyzer which you use
var analyzer = new StandardAnalyzer(Version.LUCENE_30);
// prepare StringReader object with your text inside
StringReader stringReader = new StringReader(text);
// get the tokens stream
TokenStream tokenStream = analyzer.TokenStream("defaultFieldName", stringReader);
while (tokenStream.IncrementToken())
   ITermAttribute termAtt = tokenStream.AddAttribute<ITermAttribute>();
   var term = termAtt.Term;
   // ...
   // ... do something with your term
   // ...


Sitecore with Solr – required configuration

In this post I will provide you some information about configuration of your Sitecore for work with Solr server.

Probably everyone who faced with that task, found the most popular and really good guide from (click).

But there is a one more thing which should be made. About this additional configuration I will write today.

We have to configure our Inversion of Control containers.

When we want to use Sitecore with Solr we have to configure at lease two inversion of control containers to work parallel. (Autofac and Windsor).

So lets do it!

Open your Global.asax.cs file and check your MvcApplication class definition – it should extend a WindsorApplication. So code will look in the following way:

public class MvcApplication : WindsorApplication

Ok, the next step is initialization code for your containers. This code should looks like:

public override void Application_Start()
            this.Container = (IWindsorContainer)new WindsorContainer();
            new WindsorSolrStartUp(this.Container).Initialize();

When you have your application configured in this way you may be sure that Sitecore tools (like administration panel) and communication with Solr server will work properly.

Well and the last but not least thing – check your Global.asax file – code inside it should look like:

<%@ Application Codebehind="Global.asax.cs" Inherits="<PROJECT_NAMESPACE>.MvcApplication" Language="C#" %>​

If you have any questions or problems, do not hesitate to ask or comment bellow the post.