Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

EPiServer Find - limitations ?

Vote:
 

We are in the process of planning a fairly large B2B EpiServer E-commerce site where Find will play a central role.
There are up to 850.000 products that will be published to the site - and over 1000 existing customers that will use the site.

One of the challenges is that each customer have their own prices (per product).

I have done some initial testing with ElasticSearch - index'ing all 850.000 products. I also added 1000 extra fields for each product: CustomerPrice_1 ... CustomerPrice_1000 - with a random value (for testing purposes).The index now takes about 12 GB on disk, 1 GB Ram (depending on traffic/caching I guess) - not bad.

When searching for *Kniv* sorted by CustomerPrice_999 asc - it takes 61ms to do the search itself and also 117ms to transfer the searchresult to the browser (1000 mbit network). The size of the search result is about 2.5 MB - this could be reduced greatly (making the search even faster) by only including prices for Customer_999.

So - the ElasticSearch performance here seems very promising - and it also makes searching/sorting/pagination etc. very easy.

Before we decide to go for this approach - I have a few questions:

  • Are there any known limitation in EpiServer Find (which uses ElasticSearch.NET API / ElasticSearch) on the size/number of fields that an index can have?

  • Is there a smarter way to solve our pricing-per-customer challenge in EpiServer?
#118520
Mar 09, 2015 12:33
Vote:
 

It looks like bad design to me. I would store each price as some kind of vertical item.

#118587
Mar 10, 2015 15:42
Vote:
 

Thanks for your feedback on this guys!

Some follow up questions:

  • What are the advantages of storing as a nested/vertical field?
  • Wouldn't that make searching/sorting/pagination etc. a lot more complicated?
#118609
Mar 10, 2015 20:08
Vote:
 

I don't know what are vertical fields, but to me

public class Product
{
    public int Id { get; set; }
    public string Name { get; set; }
    ...
    [ElasticProperty(Type = FieldType.Nested)]
    public IList<CustomerPrice> Prices { get; set; }
}

is more readable / maintainable than

public class Product
{
    public int Id { get; set; }
    public string Name { get; set; }
    ...
    public decimal CustomerPrice1 { get; set; }
    public decimal CustomerPrice2 { get; set; }
    ...
    public decimal CustomerPrice1000 { get; set; }
}

You shouldn't worry too much about complex queries.
Your biggest concern will be performance / memory consumption.

For example, I've worked a lot with Apache Solr.
You can implement typeahead search in so many different ways: suggester component, ngrams, wildcard queries, etc.
Some queries are fast / take very little memory with < 10 000 documents, while others perform much better with bigger number of documents.

#118610
Mar 10, 2015 22:27
Vote:
 

"List<CustomerPrice> Prices" looks vertical in my mind.

While fields/single properties as below I figure as a horizontal structure.

public decimal CustomerPrice1 { get; set; }
public decimal CustomerPrice2 { get; set; }
...
public decimal CustomerPrice1000 { get; set; }

In other words I totally agree with Dejan :-)

#118626
Mar 11, 2015 10:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.