# Implementing an amazon/ebay like search

**URL:** https://discuss.elastic.co/t/implementing-an-amazon-ebay-like-search/6362
**Category:** Elasticsearch
**Created:** [January 12, 2012, 11:27am UTC](https://discuss.elastic.co/t/implementing-an-amazon-ebay-like-search/6362 "2012-01-12T11:27:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ittai\_Zeidman](https://avatars.discourse-cdn.com/v4/letter/i/838e76/32.png) [@Ittai\_Zeidman](https://discuss.elastic.co/u/Ittai_Zeidman)
#### Post date: [January 12, 2012, 11:27am UTC](https://discuss.elastic.co/t/implementing-an-amazon-ebay-like-search/6362/1 "2012-01-12T11:27:24Z")

</div>

Hi,  
I'm working on a web application which is focused around products;  
Currently all of our data is contained in RDBMS (mysql) and is searchable  
via joins and such.  
The performance and relevance are, as expected, horrible and that's why we  
want to employ ES as a search engine for that part of the application.  
Currently we have several entities in our model which include, amongst  
other, Product, Brand and TargetCustomer.  
In our UI we have the ability to search via a simple textbox and the  
ability to filter according to the meta-properties (Brand,  
TargetCustomer...).  
I've been reading here a lot trying to understand how I can build  
associations between different documents when I stumbled on this discussion[https://groups.google.com/forum/?hl=en#!topicsearchin/elasticsearch/many-to-many/elasticsearch/LJ-cW4\_-4BI](https://groups.google.com/forum/?hl=en#%21topicsearchin/elasticsearch/many-to-many/elasticsearch/LJ-cW4_-4BI)which made me think I may be at fault and that I should maybe revisit how  
to map my model to ES documents.  
My product entity is related in one-to-one to 3 other entities which change  
quite frequently and to 4 other entities via many-to-many but these change  
infrequently.  
I think that having the frequently changed entities nested is very  
problematic for me with respect to data maintenance, but I'm not sure if ES  
provides a good alternative solution?  
I remember seeing an example on the site, when I started looking into ES,  
about documents referencing one another via IDs (some example with A's and  
B's where B doesn't have to be nested) but I can't seem to find it to see  
if it does actually correlate to my problem.  
In any case I'd be very grateful for any pointers about the possible leads  
I should follow up on as it seems there isn't one simple solution in the  
NoSQL world (CAP and all...)

P.S. I'm also thinking of maybe trying to pick one of the 3 related  
entities which changes the most (or that I care about it's changes the  
most) and artificially have that as the parent of the products and just pay  
the price of multiple queries for the other two entities. Would appreciate  
feedback about that approach too.  
Thanks

---

<div class="post-metadata">

### Author: ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)
#### Post date: [January 13, 2012, 10:08am UTC](https://discuss.elastic.co/t/implementing-an-amazon-ebay-like-search/6362/2 "2012-01-13T10:08:00Z")

</div>

probably you meant the parent/child feature?

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

But I think if you explain your requirements (e.g. the kind of queries

- concrete data example):

> My product entity is related in one-to-one to 3 other entities which change quite frequently and  
> to 4 other entities via many-to-many but these change infrequently.

a bit more there could be different / faster solutions.

Peter.

On 12 Jan., 12:27, Ittai Zeidman [it...@fashion-traffic.com](mailto:it...@fashion-traffic.com) wrote:

> Hi,  
> I'm working on a web application which is focused around products;  
> Currently all of our data is contained in RDBMS (mysql) and is searchable  
> via joins and such.  
> The performance and relevance are, as expected, horrible and that's why we  
> want to employ ES as a search engine for that part of the application.  
> Currently we have several entities in our model which include, amongst  
> other, Product, Brand and TargetCustomer.  
> In our UI we have the ability to search via a simple textbox and the  
> ability to filter according to the meta-properties (Brand,  
> TargetCustomer...).  
> I've been reading here a lot trying to understand how I can build  
> associations between different documents when I stumbled on this discussion[https://groups.google.com/forum/?hl=en#!topicsearchin/elasticsearch...](https://groups.google.com/forum/?hl=en#%21topicsearchin/elasticsearch...)which made me think I may be at fault and that I should maybe revisit how  
> to map my model to ES documents.  
> My product entity is related in one-to-one to 3 other entities which change  
> quite frequently and to 4 other entities via many-to-many but these change  
> infrequently.  
> I think that having the frequently changed entities nested is very  
> problematic for me with respect to data maintenance, but I'm not sure if ES  
> provides a good alternative solution?  
> I remember seeing an example on the site, when I started looking into ES,  
> about documents referencing one another via IDs (some example with A's and  
> B's where B doesn't have to be nested) but I can't seem to find it to see  
> if it does actually correlate to my problem.  
> In any case I'd be very grateful for any pointers about the possible leads  
> I should follow up on as it seems there isn't one simple solution in the  
> NoSQL world (CAP and all...)
> 
> P.S. I'm also thinking of maybe trying to pick one of the 3 related  
> entities which changes the most (or that I care about it's changes the  
> most) and artificially have that as the parent of the products and just pay  
> the price of multiple queries for the other two entities. Would appreciate  
> feedback about that approach too.  
> Thanks

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 3:42am UTC](https://discuss.elastic.co/t/implementing-an-amazon-ebay-like-search/6362/3 "2017-07-06T03:42:48Z")

</div>


