equinor / witsml-explorer

Witsml Explorer data management tool.
Apache License 2.0
47 stars 50 forks source link

Limit returnElements when searching for wellbores #2535

Open eliasbruvik opened 2 months ago

eliasbruvik commented 2 months ago

When you use the search bar to search for wellbores (both with and without wildcards), we currently fetch all wellbores with all data, and then filter it locally. We need to fetch all the wellbores in order to perform wildcard searches, but we should only request the information we need. In this case idOnly could be enough.

Select Wellbores from the dropdown to search for wellbores. image

useGetWellboreSearch.ts or wellboreService.cs seems like the most relevant files. We currently re-use useGetWellbores with an empty string as the wellUid, which uses the wellbores endpoint to fetch all wellbores for all wells. Either pass along more information to the endpoint to decide what data to fetch, or see if it's enough to always use idOnly if we request wellbores without specifying the uids.