To attempt to answer your questions in one go:
We unfortunately do not have a meta-model or schema in a easily consumable form such as JSONSchema.
The JSON filters that you see in the query we refer to as JQL. JQL is just a JS friendly abstraction on top of the Portal Query Language (PQL). Every JQL filter passed to the search API is converted into a PQL query by our backend. https://github.com/icgc-dcc/dcc-portal/blob/develop/dcc-portal-pql/PQL.md
The package responsible for this is: https://github.com/icgc-dcc/dcc-portal/tree/develop/dcc-portal-server/src/main/java/org/icgc/dcc/portal/server/pql/convert
This subpackage contains the "model" for JQL as described in code: https://github.com/icgc-dcc/dcc-portal/tree/develop/dcc-portal-server/src/main/java/org/icgc/dcc/portal/server/pql/convert/model
For example you can see the possible operations here: https://github.com/icgc-dcc/dcc-portal/blob/develop/dcc-portal-server/src/main/java/org/icgc/dcc/portal/server/pql/convert/model/Operation.java#L34-L49
Since JQL is just an abstraction that sits on top of PQL, the PQL engine is responsible for defining the entity fields that are allowed to be searched on. Each searchable entity has a
TypeModel within PQL that describes the searchable fields and how to map from friendly field aliases to raw elasticsearch fields. You can see those here: https://github.com/icgc-dcc/dcc-portal/tree/develop/dcc-portal-pql/src/main/java/org/dcc/portal/pql/meta
The meta-model for JQL is in the
server/pql/convert package and the model itself is described in the
pql/meta package. We hope to one day expose an endpoint that would allow power users to directly query the portal with PQL allowing for much more powerful and general queries.
Let me know if failed to clarify anything.