Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Conversation

Simran-B
Copy link
Collaborator

Basic description of nested search, limited to Views for now.

@Simran-B Simran-B self-assigned this Aug 23, 2022
@Simran-B Simran-B requested a review from gnusi August 23, 2022 22:52
@Simran-B Simran-B added this to the 3.10 milestone Aug 23, 2022
@ansoboleva ansoboleva marked this pull request as ready for review August 31, 2022 12:37
Copy link

@Dronplane Dronplane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We state " Nested search (Enterprise Edition)" only in new-features but I suggest to mention EE in all places to avoid confusion.

@ansoboleva ansoboleva requested a review from jsteemann September 5, 2022 06:19
@Simran-B
Copy link
Collaborator Author

Simran-B commented Sep 8, 2022

@joerg84 Please clarify how to word the docs regarding Nested search support in Community vs. Enterprise Edition.

The question mark operator is available in all Editions, which means you can perform nested searches to some extent, but without index acceleration and there are some caveats:

  • FOR doc IN coll FILTER doc.arr[? FILTER ...] is a kind of nested search and works in CE (but can be slow)
  • FOR doc IN view FILTER doc.arr[? FILTER ...] is possible (can be slow) but the nested attributes need to be indexed using fields or includeAllFields in the View definition, otherwise, it will not find anything.
    UX issue: nested is silently ignored in CE, so you may be under the belief that the nested attributes were indexed but are in fact not
  • FOR doc IN view SEARCH doc.arr[? FILTER ...] throws an error in CE (not implemented) and works in EE.
    UX issue: If you index the nested attributes with fields instead of nested in EE, it can never match something using such a query and View definition and should potentially warn the user about it.
@ansoboleva ansoboleva merged commit 8ecd3bf into main Sep 14, 2022
@ansoboleva ansoboleva deleted the nested-search branch September 14, 2022 09:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

5 participants