gentics / mesh-incubator

Project which is home for planned enhancements for Gentics Mesh
3 stars 0 forks source link

Make referenced nodes searchable #121

Open elbird opened 7 years ago

elbird commented 7 years ago

Problem

Currently it is not possible to search nodes by the properties of referenced nodes (in schema-fields of type 'node' or in node-list-fields) because they are stored separately. Finding nodes via properties of a referenced node currently requires at least 2 search request:

  1. Search for referenced nodes by their properties
  2. Find all matching nodes that reference those nodes

The problem with this approach is that the first query can potentially yield a lot of results and we have a hard time searching for nodes using thousands of uuids of referenced nodes.

Possible solution

A possible solution could be to optionally index certain referenced nodes with the node in which they are referenced (similar to micronodes now). A parameter in the field-definition in the schema could indicate if referenced nodes should be indexed with the node.