Is a field nested?

Hi, everyone.

I do not know if it is even possible, but I am looking for a way to know if
a field is nested or not, using its path.

For instance, i want to know if "this.is.a.path" is of nested type or
not.
Of course, I know the index and the type, too.

I am currently working with the Java api.

Thanks in advance for any infos.

--

You could get the mapping for the index by doing something like this:

        ClusterStateResponse clusterStateResponse = 

clusterStateRequest.execute().actionGet();
ClusterState clusterState = clusterStateResponse.getState();
IndexMetaData indexMetaData =
clusterState.getMetaData().index(sourceIndex);
ImmutableMap<String, MappingMetaData> mappings =
indexMetaData.getMappings();

And in the mappings map you should find the information you are looking for.

Greets
Andrej

Am Donnerstag, 10. Januar 2013 13:16:13 UTC+1 schrieb DH:

Hi, everyone.

I do not know if it is even possible, but I am looking for a way to know
if a field is nested or not, using its path.

For instance, i want to know if "this.is.a.path" is of nested type or
not.
Of course, I know the index and the type, too.

I am currently working with the Java api.

Thanks in advance for any infos.

--

Thanks, Andrej.
I hadn't thought about that.
That should do it.

Le jeudi 10 janvier 2013 13:16:13 UTC+1, DH a écrit :

Hi, everyone.

I do not know if it is even possible, but I am looking for a way to know
if a field is nested or not, using its path.

For instance, i want to know if "this.is.a.path" is of nested type or
not.
Of course, I know the index and the type, too.

I am currently working with the Java api.

Thanks in advance for any infos.

--