Closed datavistics closed 4 years ago
@datavistics:
On the Elastic part, if you want to search, you should carefully think of how do you want to structure your data. In that case you should index your data as follows:
class Student(Document):
name = Text()
teacher = Nested(...) # Replace with inner doc as shown in the documentation link below
See official docs.
However, nested queries are not yet implemented in this library in a generic way. For your that should involve some custom code, instead of generic declarative approach (which is strictly followed in all implemented features). Basically, you should implement a custom search tailored for your needs and use it as desired.
Is there a way to use a connection field like in the graphene docs? https://docs.graphene-python.org/en/latest/relay/connection/
I haven't finalised that part, because it's not how it shall be done in Elasticsearch.
I looked in the documentation and couldnt find anything. Say I have some indices defined like this
If the teacher field is the Teacher id: How can I create a connection between the student and the teacher?