Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/explorer v2 #343

Merged
merged 50 commits into from
Sep 13, 2024
Merged

Feature/explorer v2 #343

merged 50 commits into from
Sep 13, 2024

Conversation

rwiker
Copy link
Contributor

@rwiker rwiker commented Sep 12, 2024

Issue

Short description

  • Most of the functionality is now in the class SearchContext (something similar was done earlier, but the idea has been extended and generalized.)
  • Actual search is done as late as possible.
  • Searching only picks up document uuids. A PIT is used transparently while collecting the full set of uuids.
  • Accessing document contents first looks in a cache; if the document is not cached, it is fetched from Sumo.
  • When a document is fetched from Sumo, up to 100 documents are actually fetched (the documen that is actually asked for, plus up to 99 documents following it in the list of uuids.)
  • Filtering has been generalized, and is now described via a table.
  • Document property access has been generalized, and is described via a table.
  • The full set of property values is now extracted via composite aggregation. A PIT is used transparently while collecting the values.
  • iteration and realization are now available as virtual objects (this will be changed as soon as these have been added as actual, stored and indexed objects).
  • The filter method can now take a complex parameter, where custom elasticsearch queries can be specified.
  • Filters can be specified in arbitrary order. Example: exp.cubes.cases now returns a set of cases that contain cubes.
  • .cases, .iterations and .realizations now returns cases, realizations and iterations present in a selection.

Pre-review checklist

  • Read through all changes. No redundant print() statements, commented-out code, or other remnants from the development. 👀
  • Make sure tests pass after every commit. ✅
  • New/refactored code is following same conventions as the rest of the code base. 🧬
  • New/refactored code is tested. ⚙
  • Documentation has been updated 🧾

Pre-merge checklist

  • Commit history is consistent and clean. 👌

Raymond Wiker added 30 commits September 12, 2024 12:40
…cted implementation for .timestamps. Also, added complex filter.
…meter to __search_all and async version to make _maybe_refresh work better.
Deleted class-specific collection classes, as these are now handled by SearchContext.
…text so they can be used for further filtering.
src/fmu/sumo/explorer/objects/_search_context.py Outdated Show resolved Hide resolved
"metadata": {},
"outputs": [],
"source": [
"print(json.dumps(myrealization.metadata, indent=2))"
Copy link
Contributor

Choose a reason for hiding this comment

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

I get SearchContext object has not attribute metadata

src/fmu/sumo/explorer/objects/realizations.py Outdated Show resolved Hide resolved
src/fmu/sumo/explorer/explorer.py Outdated Show resolved Hide resolved
src/fmu/sumo/explorer/objects/iteration.py Outdated Show resolved Hide resolved
src/fmu/sumo/explorer/objects/iterations.py Outdated Show resolved Hide resolved
src/fmu/sumo/explorer/objects/iterations.py Outdated Show resolved Hide resolved
src/fmu/sumo/explorer/objects/realization.py Outdated Show resolved Hide resolved
src/fmu/sumo/explorer/objects/_search_context.py Outdated Show resolved Hide resolved
Copy link
Contributor

@equinor-ruaj equinor-ruaj left a comment

Choose a reason for hiding this comment

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

lgtm

@rwiker rwiker merged commit 5b924b5 into main Sep 13, 2024
25 checks passed
@rwiker rwiker deleted the feature/explorer-v2 branch September 13, 2024 11:34
@equinor-ruaj equinor-ruaj linked an issue Sep 16, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Represent Realization and Iteration as virtual objects
2 participants