# Integrate Content-Based Image Retrieval in Elasticsearch

**URL:** https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825
**Category:** Elasticsearch
**Created:** [January 24, 2011, 7:25pm UTC](https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825 "2011-01-24T19:25:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Aecio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aecio/32/2403_2.png) [@Aecio](https://discuss.elastic.co/u/Aecio)
#### Post date: [January 24, 2011, 7:25pm UTC](https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825/1 "2011-01-24T19:25:30Z")

</div>

Hi,

I am wondering how dificult would be to integrate an API like LIRE (  
[http://www.semanticmetadata.net/lire/](http://www.semanticmetadata.net/lire/)) into ElasticSearch. LIRe is an  
Content-Based Image Retrieval Library based on Lucene. It relies on lucene  
indexes to search image descriptors.  
How the integration would be possible? Creating a new module in  
ElasticSearch?

Regards,  
Aécio Santos.  
[http://lapesi.ifpi.edu.br](http://lapesi.ifpi.edu.br)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [January 24, 2011, 8:15pm UTC](https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825/2 "2011-01-24T20:15:08Z")

</div>

If what it does is parse images and creates fields with possible more info on them, and possibly have specific set of queries associated with it, then it should not be too difficult to write a plugin that does that.  
On Monday, January 24, 2011 at 9:25 PM, AÃ©cio wrote:

> Hi,
> 
> I am wondering how dificult would be to integrate an API like LIRE ([Lire | SemanticMetadata.net](http://www.semanticmetadata.net/lire/)) into Elasticsearch. LIRe is an Content-Based Image Retrieval Library based on Lucene. It relies on lucene indexes to search image descriptors.  
> How the integration would be possible? Creating a new module in Elasticsearch?
> 
> Regards,  
> AÃ©cio Santos.  
> [http://lapesi.ifpi.edu.br](http://lapesi.ifpi.edu.br)

---

<div class="post-metadata">

### Author: ![Aecio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aecio/32/2403_2.png) [@Aecio](https://discuss.elastic.co/u/Aecio)
#### Post date: [January 25, 2011, 2:14am UTC](https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825/3 "2011-01-25T02:14:35Z")

</div>

What LIRe does is extract image features (from a  
java.awt.image.BufferedImage) and store them as text in lucene documents  
during indexing. This document can be indexed normally using Lucene's  
IndexWriter. For search it receives a BufferedImage as query and returns  
ImageSearchHits. It uses the IndexReader directly instead of IndexSearcher.  
More info about LIRe can be found on this paper:  
[http://kusu.comp.nus.edu.sg/proceedings/mm08/mm/p1085.pdf](http://kusu.comp.nus.edu.sg/proceedings/mm08/mm/p1085.pdf)

I don't know Elasticsearch well. There's any docs about how to create  
plugins? How can I get started with Elasticsearch internals?

2011/1/24 Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)

> If what it does is parse images and creates fields with possible more  
> info on them, and possibly have specific set of queries associated with it,  
> then it should not be too difficult to write a plugin that does that.
> 
> On Monday, January 24, 2011 at 9:25 PM, Aécio wrote:
> 
> Hi,
> 
> I am wondering how dificult would be to integrate an API like LIRE (  
> [Lire | SemanticMetadata.net](http://www.semanticmetadata.net/lire/)) into Elasticsearch. LIRe is an  
> Content-Based Image Retrieval Library based on Lucene. It relies on lucene  
> indexes to search image descriptors.  
> How the integration would be possible? Creating a new module in  
> Elasticsearch?
> 
> Regards,  
> Aécio Santos.  
> [http://lapesi.ifpi.edu.br](http://lapesi.ifpi.edu.br)

--  
Regards,  
Aécio Santos.  
[http://lapesi.ifpi.edu.br](http://lapesi.ifpi.edu.br)

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [January 25, 2011, 6:11pm UTC](https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825/4 "2011-01-25T18:11:13Z")

</div>

On Tuesday, January 25, 2011 at 4:14 AM, AÃ©cio wrote:

> What LIRe does is extract image features (from a java.awt.image.BufferedImage) and store them as text in lucene documents during indexing. This document can be indexed normally using Lucene's IndexWriter. For search it receives a BufferedImage as query and returns ImageSearchHits. It uses the IndexReader directly instead of IndexSearcher.  
> More info about LIRe can be found on this paper: [http://kusu.comp.nus.edu.sg/proceedings/mm08/mm/p1085.pdf](http://kusu.comp.nus.edu.sg/proceedings/mm08/mm/p1085.pdf)
> 
> I don't know Elasticsearch well. There's any docs about how to create plugins? How can I get started with Elasticsearch internals?

Get the source code and have a look. Check the attachments plugin for introduction of a new field type.

> 2011/1/24 Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)
> 
> > If what it does is parse images and creates fields with possible more info on them, and possibly have specific set of queries associated with it, then it should not be too difficult to write a plugin that does that.  
> > On Monday, January 24, 2011 at 9:25 PM, AÃ©cio wrote:
> > 
> > > Hi,
> > > 
> > > I am wondering how dificult would be to integrate an API like LIRE ([Lire | SemanticMetadata.net](http://www.semanticmetadata.net/lire/)) into Elasticsearch. LIRe is an Content-Based Image Retrieval Library based on Lucene. It relies on lucene indexes to search image descriptors.  
> > > How the integration would be possible? Creating a new module in Elasticsearch?
> > > 
> > > Regards,  
> > > AÃ©cio Santos.  
> > > [http://lapesi.ifpi.edu.br](http://lapesi.ifpi.edu.br)
> 
> --  
> Regards,  
> AÃ©cio Santos.  
> [http://lapesi.ifpi.edu.br](http://lapesi.ifpi.edu.br)

---

<div class="post-metadata">

### Author: ![lemig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lemig/32/2345_2.png) [@lemig](https://discuss.elastic.co/u/lemig)
#### Post date: [May 9, 2013, 11:19am UTC](https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825/5 "2013-05-09T11:19:47Z")

</div>

Hi Aécio,  
I was wondering how far did you get into that project.  
I am also interested in a solution combining both technologies. (Even a paid one)  
Regards,  
lemig

lemig at hotmail dot com

---

<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, 2:37am UTC](https://discuss.elastic.co/t/integrate-content-based-image-retrieval-in-elasticsearch/3825/6 "2017-07-06T02:37:21Z")

</div>


