# Group similar product

**URL:** <https://discuss.elastic.co/t/group-similar-product/9956>\
**Category:** Elasticsearch\
**Created:** [December 5, 2012, 5:05pm UTC](https://discuss.elastic.co/t/group-similar-product/9956 "2012-12-05T17:05:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Houssan\_A\_Hijazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/houssan_a_hijazi/32/2588_2.png) [@Houssan\_A\_Hijazi](https://discuss.elastic.co/u/Houssan_A_Hijazi)\
**Post date:** [December 5, 2012, 5:05pm UTC](https://discuss.elastic.co/t/group-similar-product/9956/1 "2012-12-05T17:05:09Z")

</div>

Hi,

i have make a search with _sony_+_hx100v_ and search this in mysql:

CAM DIG.SONY HX100V 16.2 PRETO S/GARANT 0  
CAM FOTO SONY DSC-HX100V/B 16.2M WHITE  
CAM. FOTO SONY DSC-HX100V 16.2MP NEGRO  
CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
CAM FOTO SONY DSC-HX100V/B 16.2M pp  
CAM FOTO SONY DSC-HX100V/B 16.2M p  
CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
CAM FOTO SONY DSC-HX100V/B 16.2M BLACK

How i can create a search to give me how much is similar my search with the  
result with SE?

thanks

--

---

<div class="post-metadata">

**Author:** ![Houssan\_A\_Hijazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/houssan_a_hijazi/32/2588_2.png) [@Houssan\_A\_Hijazi](https://discuss.elastic.co/u/Houssan_A_Hijazi)\
**Post date:** [December 5, 2012, 5:07pm UTC](https://discuss.elastic.co/t/group-similar-product/9956/2 "2012-12-05T17:07:09Z")

</div>

Hi,

I am using plugin elasticsearch-river-jdbc-master to index the data from  
mysql

Em quarta-feira, 5 de dezembro de 2012 15h05min09s UTC-2, Houssan A. Hijazi  
escreveu:

> Hi,
> 
> i have make a search with _sony_+_hx100v_ and search this in mysql:
> 
> CAM DIG.SONY HX100V 16.2 PRETO S/GARANT 0  
> CAM FOTO SONY DSC-HX100V/B 16.2M WHITE  
> CAM. FOTO SONY DSC-HX100V 16.2MP NEGRO  
> CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> CAM FOTO SONY DSC-HX100V/B 16.2M pp  
> CAM FOTO SONY DSC-HX100V/B 16.2M p  
> CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> CAM FOTO SONY DSC-HX100V/B 16.2M BLACK
> 
> How i can create a search to give me how much is similar my search with  
> the result with SE?
> 
> thanks

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 5, 2012, 5:24pm UTC](https://discuss.elastic.co/t/group-similar-product/9956/3 "2012-12-05T17:24:32Z")

</div>

Something like curl localhost:9200/\_search?q=+sony%20+hx100v could work.

Or something like curl localhost:9200/\_search -d "{  
"query" : {

"query\_string" : {  
"default\_field" : "content",  
"query" : "+sony +hx100v"  
}  
}

}"

But it depends on your mapping.

David.

Le 5 décembre 2012 à 18:07, "Houssan A. Hijazi" [hussanhijazi@gmail.com](mailto:hussanhijazi@gmail.com) a écrit  
:

> Hi,
> 
> I am using plugin elasticsearch-river-jdbc-master to index the data from  
> mysql
> 
> Em quarta-feira, 5 de dezembro de 2012 15h05min09s UTC-2, Houssan A. Hijazi  
> escreveu:
> 
> > > Hi,
> > 
> > i have make a search with _sony_+_hx100v_ and search this in mysql:
> > 
> > CAM DIG.SONY HX100V 16.2 PRETO S/GARANT 0  
> > CAM FOTO SONY DSC-HX100V/B 16.2M WHITE  
> > CAM. FOTO SONY DSC-HX100V 16.2MP NEGRO  
> > CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> > CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> > CAM FOTO SONY DSC-HX100V/B 16.2M pp  
> > CAM FOTO SONY DSC-HX100V/B 16.2M p  
> > CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> > CAM FOTO SONY DSC-HX100V/B 16.2M BLACK
> > 
> > How i can create a search to give me how much is similar my search with  
> > the result with SE ?
> > 
> > thanks
> > 
> > >
> 
> --

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![Houssan\_A\_Hijazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/houssan_a_hijazi/32/2588_2.png) [@Houssan\_A\_Hijazi](https://discuss.elastic.co/u/Houssan_A_Hijazi)\
**Post date:** [December 5, 2012, 5:41pm UTC](https://discuss.elastic.co/t/group-similar-product/9956/4 "2012-12-05T17:41:09Z")

</div>

Hi,

thank you for your answer but i have this problem.

I index my products from many shops and some shops call name of products  
different than other shops.  
example:

shop a: Cel. Iphone 5 16GB White  
shop b: Mobile Iphone 5 16 GB W.  
shop c: Iphone5 16GB White  
shop d: Iphone 5 16GB Whi

i have many names to same product, can i solve this with elasticsearch ?  
maybe similarity?

Thanks

Em quarta-feira, 5 de dezembro de 2012 15h24min32s UTC-2, David Pilato  
escreveu:

> Something like curl localhost:9200/\_search?q=+sony%20+hx100v could work.
> 
> Or something like curl localhost:9200/\_search -d "{  
> "query" : {
> 
> "query\_string" : {  
> "default\_field" : "content",  
> "query" : "+sony +hx100v"  
> }  
> }
> 
> }"  
> But it depends on your mapping.
> 
> David.
> 
> Le 5 décembre 2012 à 18:07, "Houssan A. Hijazi" \<[hussan...@gmail.com](mailto:hussan...@gmail.com)\<javascript:\>\>  
> a écrit :
> 
> Hi,
> 
> I am using plugin elasticsearch-river-jdbc-master to index the data from  
> mysql
> 
> Em quarta-feira, 5 de dezembro de 2012 15h05min09s UTC-2, Houssan A.  
> Hijazi escreveu:
> 
> Hi,
> 
> i have make a search with _sony_+_hx100v_ and search this in mysql:
> 
> CAM DIG.SONY HX100V 16.2 PRETO S/GARANT 0  
> CAM FOTO SONY DSC-HX100V/B 16.2M WHITE  
> CAM. FOTO SONY DSC-HX100V 16.2MP NEGRO  
> CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> CAM FOTO SONY DSC-HX100V/B 16.2M pp  
> CAM FOTO SONY DSC-HX100V/B 16.2M p  
> CAMERA DIGITAL SONY DSC-HX100V 16.2 MEGA PIXELS 3.  
> CAM FOTO SONY DSC-HX100V/B 16.2M BLACK
> 
> How i can create a search to give me how much is similar my search with  
> the result with SE ?
> 
> thanks
> 
> --
> 
> --  
> David Pilato  
> [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 5, 2012, 6:01pm UTC](https://discuss.elastic.co/t/group-similar-product/9956/5 "2012-12-05T18:01:57Z")

</div>

Hi Houssan,

the data model you use has no canonical forms. You need to do some  
normalization beforehand so that each shop refers to the same product ID.  
There are many ways to perform data normalization but they are outside of  
Elasticsearch.

Best regards,

Jörg

--

---

<div class="post-metadata">

**Author:** ![Houssan\_A\_Hijazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/houssan_a_hijazi/32/2588_2.png) [@Houssan\_A\_Hijazi](https://discuss.elastic.co/u/Houssan_A_Hijazi)\
**Post date:** [December 5, 2012, 6:29pm UTC](https://discuss.elastic.co/t/group-similar-product/9956/6 "2012-12-05T18:29:43Z")

</div>

Ok,

i undestrand, but how i can do the automatic normalization ? can you  
suggest something?

thanks

Em quarta-feira, 5 de dezembro de 2012 16h01min57s UTC-2, Jörg Prante  
escreveu:

> Hi Houssan,
> 
> the data model you use has no canonical forms. You need to do some  
> normalization beforehand so that each shop refers to the same product ID.  
> There are many ways to perform data normalization but they are outside of  
> Elasticsearch.
> 
> Best regards,
> 
> Jörg

--

---

<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:01am UTC](https://discuss.elastic.co/t/group-similar-product/9956/7 "2017-07-06T03:01:12Z")

</div>


