Product sorting is miss-sorted



I'm currently developing an ecommerce solution using episerver 6 with commerce.

recently i'm stumbled upon a strange case.

I crearted a metafield called "Brand" for my products, and would store the product's brand name (well, obviously). I use the type "String Dictionary" for this metafield. here are the export file for the metafield looks like:

  <Tag />
  - <Attributes>
    - <Attribute>
    - <Attribute>
    - <Attribute>
    - <Attribute>
    - <Attribute>
  <Dictionary>Easy Cook</Dictionary>
  <Dictionary>Fisher & Paykel</Dictionary>
<Dictionary>K Mix</Dictionary> <Dictionary>Kenwood</Dictionary> <Dictionary>LG</Dictionary> <Dictionary>Mitsubishi</Dictionary> <Dictionary>Panasonic</Dictionary> <Dictionary>Phillips</Dictionary> <Dictionary>Samsung</Dictionary> <Dictionary>Sharp</Dictionary> <Dictionary>ZZZ</Dictionary> </MetaField>

the problem is, when the products is displayed, and sorted alphabetically by "Brands", some of the brands are out of their grouping. the known case so far is: "Fisher and Paykel" would be placed under products starting with "P" along with "panasonic", "phillips", etc. and not under "F". this also happen with "K Mix", which would fall under "M", and not "K".

what drives me crazy is that I couldn't find the pattern of this irregularities. i.e: I've tried inputting some brands like these:


  • "Power & Art" -> it goes to "P"
  • "Fisher and Art" -> it goes to "F"
  • "Art and Fisher" -> it goes to "F" 
  • "Fisher $ Paykel" -> it goes to "F"
  • "Johnson And Paykel" -> it goes to "P"
  • etc. (i tested A LOT of other combination)

It’s true that I ran this test randomly and not covered all of the possibilities. but the more i expand my choice of words combination, the furhter I drift from the conclusion.

fyi, I use the default Lucene as search provider, and the search method I use is basically using Search method from Mediachase.Search.SearchManager (Assembly Mediachase.Search.dll, v2.0.50727)

forget application level sorting, because the sorting and paging supposed to be handled by the search provider.


I really need a hand here. what caused this miss-sorting issue? and what are the solution?

Feb 05, 2013 4:30


Have you tried to change the value for "Tokenized"?

- Tokenize - search is prepared for individual words in, for example a long product description property (word breaking).


Feb 05, 2013 21:05

Thanks mate. I've founded it too.

you're right, it was all because of the "tokenized" attribute. when I disable the tokenized, the sorting problem is solved. 

but then I stumble upon another problem: if the "tokenized" is not enabled, text searching for the multiple words product won't return any result. For example: 

  • if "tokenized" is active, when I searched with keyword "Fisher", it will return all the products with "Fisher & paykel" brand.
  • if "tokenized" is not active, searching with keyword "Fisher" will not return any result

now I'm facing the dillema. Do you have any suggestion on how to fix the sorting without sacrificing the searching accuracy?



Feb 06, 2013 6:42
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.