Skip to content

Commit

Permalink
Enable both include and exclude for _source, with default set to exis…
Browse files Browse the repository at this point in the history
…ting include list.
  • Loading branch information
rwiker committed Nov 28, 2023
1 parent c87b385 commit b4315b5
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 33 deletions.
52 changes: 27 additions & 25 deletions src/fmu/sumo/explorer/objects/_child_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,33 @@
from fmu.sumo.explorer.timefilter import TimeFilter
from fmu.sumo.explorer.pit import Pit

_CHILD_FIELDS = [
"_id",
"data.name",
"data.content",
"data.tagname",
"data.time",
"data.format",
"data.bbox",
"data.spec",
"data.stratigraphic",
"data.vertical_domain",
"fmu.case.name",
"fmu.case.user.id",
"fmu.realization.id",
"fmu.iteration.name",
"fmu.context.stage",
"fmu.aggregation.operation",
"_sumo.status",
"access.asset",
"masterdata.smda.field",
"file.checksum_md5",
"file.relative_path",
"data.is_observation",
"data.is_prediction"
]
_CHILD_FIELDS = {
"include": [
"_id",
"data.name",
"data.content",
"data.tagname",
"data.time",
"data.format",
"data.bbox",
"data.spec",
"data.stratigraphic",
"data.vertical_domain",
"fmu.case.name",
"fmu.case.user.id",
"fmu.realization.id",
"fmu.iteration.name",
"fmu.context.stage",
"fmu.aggregation.operation",
"_sumo.status",
"access.asset",
"masterdata.smda.field",
"file.checksum_md5",
"file.relative_path",
"data.is_observation",
"data.is_prediction"
]
}


class ChildCollection(DocumentCollection):
Expand Down
18 changes: 10 additions & 8 deletions src/fmu/sumo/explorer/objects/case_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
from fmu.sumo.explorer.objects.case import Case
from fmu.sumo.explorer.pit import Pit

_CASE_FIELDS = [
"_id",
"fmu.case.name",
"fmu.case.user.id",
"_sumo.status",
"access.asset",
"masterdata.smda.field",
]
_CASE_FIELDS = {
"include": [
"_id",
"fmu.case.name",
"fmu.case.user.id",
"_sumo.status",
"access.asset",
"masterdata.smda.field",
]
}


class CaseCollection(DocumentCollection):
Expand Down

0 comments on commit b4315b5

Please sign in to comment.