OSDU® Search Service
Search
Search in R2 and beyond follows the Elastic Search specification. See the OSDU® Forum reference for Query Syntax
Configure your Deployment Parameters
export ACCESS_TOKEN=<value> # replace with user's value
export ENERGY_DATA_INSIGHTS_URL=<value> # replace with URL for your 47Lining Energy Data Insights , including HTTPS
Wildcard Search
The fulltext search sample will search for all kinds
.
curl \
-H 'authorization: Bearer '"$ACCESS_TOKEN"'' \
-H "Content-Type:application/json" \
-X POST \
-H 'data-partition-id:osdu' \
-d '{"kind":"*:*:*:*","query": "*","limit":"5","returnedFields":["id","kind"]}' \
$ENERGY_DATA_INSIGHTS_URL/api/search/v2/query
Field match Search for FacilityName
The FacilityName search sample will search for only Well kinds and specific facility names based on search value prefix.
curl \
-H 'authorization: Bearer '"$ACCESS_TOKEN"'' \
-H "Content-Type:application/json" \
-H 'data-partition-id:osdu' \
-X POST \
-d '{"kind":"*:*:master-data--Well:*", "query": "data.FacilityName:BIR*", "returnedFields": ["data.FacilityName", "id", "kind"],"limit":5 }' \
$ENERGY_DATA_INSIGHTS_URL/api/search/v2/query