Different Path for each Index

Hi,

Can any one help me... I want different path while creating Index... Is it possible to give path in API ???

No. Not really. A data path is a Node Level settings.

You can though decide on which nodes you can allocate the index shards but that's not exactly what you want.

Now the question is: what problem you want to solve here? I might have better solution if I understand the context.

Hi,

Thanks for the fast reply.

Now, Actually I have 1000 of documents which I want to Index. But not on the same path as defined in path.data directives in elasticsearch.yml file. What I want is 100 document on one path. another 100 on different path and so on..... So Is there any possibility that i can set path at Index level i.e While creating Index for each document. Please guide me.

I am using ES 5.4.3

Hope you got my point..

But not on the same path as defined in path.data directives in elasticsearch.yml file.

Why do you need that is the question? It does not really make sense in the context of distributed data. What is the problem you think you will be solving by using such a thing?

Anyway, may be you are confused by indices and paths.
May be you want to separate documents let's say per client.

Elasticsearch is multi-tenant which means that you can do:

PUT client1/doc/1
{
 "foo": "bar1"
}
PUT client2/doc/1
{
 "foo": "bar2"
}

Then you can search in:

GET client1/_search
# Or
GET client2/_search
# Or
GET client1,client2/_search

Is that what you are looking for?

But the location of the data on disk should not be a concern. It's transparent.

1 Like

Hello David,

First of all If I am confusing you then very sorry .. but Its my Production Environment requirement that while doing indexing, we can decide the path on which node it is allotted .....Though It is clustered environment ....
So Is there any way we can declare path for each node separately in index API ??

Further,
Is there any way to give encrypted password while Indexing/Querying ??

Currently with x-pack security I am doing like
curl -XGET -u username:password http://Server:9200/_cluster/health?pretty

So instead of giving password naked, Is there any way to give it in encrypted form...

Hope you got me....

Thanks...

No. Why is that a requirement, what purpose does it serve?

What clients are you using to interact with Elasticsearch?

C# and NEST

Hello,

Consider the following Scenario...

If I am doing indexing with 5 different users i.e a,b,c,d,e....
So if I do indexing using user a it will put data(shards) in a folder
If indexing using user b it will put data in b folder
and so on.....

Is this possible using API ??

It's not possible unless you spin up different clusters.

But, again, what are you trying to solve with this?

Means I have to create different cluster for each and every user ???
The basic idea behind this is to differentiate/Separate the indexes created by each user...

So just create separate indices? It's still not clear why you cannot just use an index per user.

This is the requirement from my Production side .....
All data goes in /var/lib/elasticsearch/nodes/0/indeces/........ while indexing a document ...by default

They want to give this path manually via API ....
Is this possible ???

No it's not.

And you are probably misunderstanding what elasticsearch is.

Ok.. Thanks David and Mark for your Valuable time...
And Sorry for this misunderstanding......As I am new/beginner to ES....

That's why we are asking the question about the needs and not the way you think you implement this.

Again, don't worry about the structure on disk. Elasticsearch is just accessible through the APIs.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.