# ElasticSearch and Mahout

**URL:** <https://discuss.elastic.co/t/elasticsearch-and-mahout/5194>\
**Category:** Elasticsearch\
**Created:** [August 18, 2011, 6:04pm UTC](https://discuss.elastic.co/t/elasticsearch-and-mahout/5194 "2011-08-18T18:04:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Estrada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_estrada/32/2704_2.png) [@Adam\_Estrada](https://discuss.elastic.co/u/Adam_Estrada)\
**Post date:** [August 18, 2011, 6:04pm UTC](https://discuss.elastic.co/t/elasticsearch-and-mahout/5194/1 "2011-08-18T18:04:14Z")

</div>

Has anyone been successful in grabbing tokenized fields from ES to go  
in to Mahouts format?

You can point to an index using $MAHOUT\_HOME/bin/mahout lucene.vector  
but the possibility to have multiple indexes is pretty high in ES so  
what is the best strategy for doing this? Can anyone give me a good  
starting point to go from?

Thanks,  
Adam

---

<div class="post-metadata">

**Author:** ![AGuereca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aguereca/32/2357_2.png) [@AGuereca](https://discuss.elastic.co/u/AGuereca)\
**Post date:** [August 23, 2011, 4:31pm UTC](https://discuss.elastic.co/t/elasticsearch-and-mahout/5194/2 "2011-08-23T16:31:06Z")

</div>

Hi Adam,

Just curious, did you find a working approach for this?

Thanks,  
~AG

On Aug 18, 1:04 pm, Adam Estrada [estrada.a...@gmail.com](mailto:estrada.a...@gmail.com) wrote:

> Has anyone been successful in grabbing tokenized fields from ES to go  
> in to Mahouts format?
> 
> You can point to an index using $MAHOUT\_HOME/bin/mahoutlucene.vector  
> but the possibility to have multiple indexes is pretty high in ES so  
> what is the best strategy for doing this? Can anyone give me a good  
> starting point to go from?
> 
> Thanks,  
> Adam

---

<div class="post-metadata">

**Author:** ![Adam\_Estrada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_estrada/32/2704_2.png) [@Adam\_Estrada](https://discuss.elastic.co/u/Adam_Estrada)\
**Post date:** [August 23, 2011, 10:07pm UTC](https://discuss.elastic.co/t/elasticsearch-and-mahout/5194/3 "2011-08-23T22:07:17Z")

</div>

I have not but I assume (after watching one of Shay's videos) that the  
main index or (0) is where the data I need is located.

Adam

On Aug 23, 12:31 pm, AGuereca [aguer...@gmail.com](mailto:aguer...@gmail.com) wrote:

> Hi Adam,
> 
> Just curious, did you find a working approach for this?
> 
> Thanks,  
> ~AG
> 
> On Aug 18, 1:04 pm, Adam Estrada [estrada.a...@gmail.com](mailto:estrada.a...@gmail.com) wrote:
> 
> > Has anyone been successful in grabbing tokenized fields from ES to go  
> > in to Mahouts format?
> 
> > You can point to an index using $MAHOUT\_HOME/bin/mahoutlucene.vector  
> > but the possibility to have multiple indexes is pretty high in ES so  
> > what is the best strategy for doing this? Can anyone give me a good  
> > starting point to go from?
> 
> > Thanks,  
> > Adam

---

<div class="post-metadata">

**Author:** ![Tomislav\_Poljak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomislav_poljak/32/1177_2.png) [@Tomislav\_Poljak](https://discuss.elastic.co/u/Tomislav_Poljak)\
**Post date:** [August 29, 2011, 1:43pm UTC](https://discuss.elastic.co/t/elasticsearch-and-mahout/5194/4 "2011-08-29T13:43:45Z")

</div>

Hi,

2011/8/24 Adam Estrada [estrada.adam@gmail.com](mailto:estrada.adam@gmail.com):

> I have not but I assume (after watching one of Shay's videos) that the  
> main index or (0) is where the data I need is located.

if you don't want to deal with multiple indices (multiple index  
shards) you can set number of shards to 1 with

curl -XPUT '[http://localhost:9200/mahout\_index/](http://localhost:9200/mahout_index/)' -d '  
index :  
number\_of\_shards : 1  
number\_of\_replicas : 1  
'

With the default settings you will find Lucene index which you can  
open with Luke, Mahout etc. in  
ES/data/elasticsearch/nodes/0/indices/mahout\_index/0/index

If you do need multiple indices (multiple index shards), with shared  
FS gateway defined you can open all indices in shared gateway location  
(one by one and create Mahout vectors from each).

Hope this helps,

Tomislav

> Adam
> 
> On Aug 23, 12:31 pm, AGuereca [aguer...@gmail.com](mailto:aguer...@gmail.com) wrote:
> 
> > Hi Adam,
> > 
> > Just curious, did you find a working approach for this?
> > 
> > Thanks,  
> > ~AG
> > 
> > On Aug 18, 1:04 pm, Adam Estrada [estrada.a...@gmail.com](mailto:estrada.a...@gmail.com) wrote:
> > 
> > > Has anyone been successful in grabbing tokenized fields from ES to go  
> > > in to Mahouts format?
> > 
> > > You can point to an index using $MAHOUT\_HOME/bin/mahoutlucene.vector  
> > > but the possibility to have multiple indexes is pretty high in ES so  
> > > what is the best strategy for doing this? Can anyone give me a good  
> > > starting point to go from?
> > 
> > > Thanks,  
> > > Adam

---

<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:55am UTC](https://discuss.elastic.co/t/elasticsearch-and-mahout/5194/5 "2017-07-06T03:55:44Z")

</div>


