# HTML structural similarity

**URL:** <https://discuss.elastic.co/t/html-structural-similarity/45069>\
**Category:** Elasticsearch\
**Created:** [March 22, 2016, 6:38am UTC](https://discuss.elastic.co/t/html-structural-similarity/45069 "2016-03-22T06:38:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peyman\_Mohajerian](https://avatars.discourse-cdn.com/v4/letter/p/cab0a1/32.png) [@Peyman\_Mohajerian](https://discuss.elastic.co/u/Peyman_Mohajerian)\
**Post date:** [March 22, 2016, 6:38am UTC](https://discuss.elastic.co/t/html-structural-similarity/45069/1 "2016-03-22T06:38:29Z")

</div>

My goal is to find structural similarity among web sites that I'm crawling. Doing content based similarity is easy using 'more like this' query but I'm interested in structural similarity, e.g. same author who created site X must be behind site Y because the site's source code are similar even though the content may not be. I have found some relevant publication:  
Buttler, David. "A Short Survey of Document Similarity Algorithms," IC'04 June 21-24, Las Vegas, NV (2004).

There is perhaps more recent work as well. My question is: how to I do this in Elasticsearch? My first idea was to extract the XML DOM of each web site and compare them using 'more like this' query. But I'm doubtful it will work because it will do text-based comparison.

Thanks in advance

---

<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 5, 2017, 11:06pm UTC](https://discuss.elastic.co/t/html-structural-similarity/45069/2 "2017-07-05T23:06:25Z")

</div>

Closed on July 5, 2017, 11:06pm UTC


