MixedIndex naming convention


Ravikumar Govindarajan <ravikumar....@...>
 

I saw in many places of documentation/tutorials, that the mixed indexes have this

mgmt.buildIndex("vertices", Vertex.class).addKey(key).buildMixedIndex(INDEX_NAME); // With INDEX_NAME ='search', mostly


Will this create one index in ElasticSearch/SOLR for one property or all properties are clubbed under a single index? 


Also does JanusGraph partition these text based indexes, in case they get too large?


--

Ravi




Jason Plurad <plu...@...>
 

I think all of the answers are already in the docs (see the Note box in the ES Configuration Overview and Index Creation Options). If there are specific ways you think the docs could be improved, it would be good if you opened up an issue and even better if you submitted a pull request.

In your graph configuration, you actually define the indexes and the shards. You can define more than one index by using a different name for [X]. If you don't set the number of shards, it will default to 5 as dictated by Elasticsearch. For example:

# creating an index named "search". your graph mgmt code would use buildMixedIndex("search")
index
.search.backend=elasticsearch
index
.search.hostname=127.0.0.1
index.search.elasticsearch.client-only=true
# default index name is janusgraph if not explicitly configured. this is how ES refers to it.

# default number of shards is 5

# creating an index named "ravi". your graph mgmt code would use buildMixedIndex("ravi")
index
.ravi.backend=elasticsearch
index
.ravi.hostname=127.0.0.1
index.ravi.elasticsearch.client-only=true
# it's a good idea to set the index-name to the same name

index
.ravi.index-name=ravi
# overriding the default number of shards
index.ravi.elasticsearch.create.ext.index.number_of_shards=8

After you initialize your graph, you can verify that 2 indexes are created in ES, with different # shards in this example:

$ curl http://127.0.0.1:9200/_cat/indices?v
health status index      pri rep docs
.count docs.deleted store.size pri.store.size
yellow open   janusgraph  
5   1          0            0       345b           345b
yellow open   ravi        
8   1          0            0       920b           920b


-- Jason


On Tuesday, June 20, 2017 at 8:31:56 AM UTC-4, Ravikumar Govindarajan wrote:
I saw in many places of documentation/tutorials, that the mixed indexes have this

mgmt.buildIndex("vertices", Vertex.class).addKey(key).buildMixedIndex(INDEX_NAME); // With INDEX_NAME ='search', mostly


Will this create one index in ElasticSearch/SOLR for one property or all properties are clubbed under a single index? 


Also does JanusGraph partition these text based indexes, in case they get too large?


--

Ravi