I am working on integrating ES into a java application that takes
generic json and indexing it for search. The json represents
different forms that users interact with and follow a uniform keys
pattern, so will make searching over data an easy task. However, the
actual schema will be different per form and since ES can work schema-
less I decided to use ES. I have already got the data indexed and am
running searches over that data. I want to create some search forms
dynamically based on the Index Type, I am creating many index types
per index - basically one index type per form.
So having said all that, I would like to get all index types for an
index. I can then query one record for each index type and get all
fields for the type to build the Search Form. I want the app to
remain schema-less so we can handle all forms they decide to build in
the future. Any ideas or tips/hints that can point me in the right
direction. I have looked at the java api and queried the forums about
this topic but haven't found anything that would do what I am looking
My only idea at this point would be to index the json schema in a
separate index. I would get the schema by parsing the json when
indexing, then add the fields to the index typed again on the form.
This way I can always easily get at the form fields. If this is the
only way to do what I am looking for then I can take that approach.
However, I would like to see if there are any more graceful ways of
handling this scenario.
Thanks for the help, and reading this far!