Chci načítat data z elastické vyhledávání na základě stavu. Pokud je stav aktivní/neaktivní chci, aby přinesla seznam údajů.
Tady jsem připojený jeden záznam, například. Jak mohu získat to?
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 2,
"successful": 2,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 1,
"relation": "eq"
},
"max_score": 1.0,
"hits": [
{
"_index": "customer-fr",
"_type": "_doc",
"_id": "NFR0002220803",
"_score": 1.0,
"_source": {
"customerManagedBy": "V",
"numOfBeds": null,
"legalEntity": null,
"dependency": null,
"credentials": [
],
"affiliations": [
{
"endDate": "2010-06-08",
"startDate": "2009-08-04",
"parent": "NFR0002220803",
"role": "Vice-Président",
"relationShipType": "Travaille sur",
"relationshipKey": "NFR0002220803|NFR0002217822|271568|2009-08-04",
"isPrimary": false,
"status": "In-Active",
"child": "NFR0002217822",
"isDuplicate": false
},
{
"endDate": "2010-06-08",
"startDate": "2009-08-04",
"parent": "NFR0002220803",
"role": "Vice-Président",
"relationShipType": "Travaille sur",
"relationshipKey": "NFR0002220803|NFR0002217823|271568|2009-08-04",
"isPrimary": false,
"status": "In-Active",
"child": "NFR0002217823",
"isDuplicate": false
},
{
"endDate": "2010-06-08",
"startDate": "2009-08-04",
"parent": "NFR0002220803",
"role": "Vice-Président",
"relationShipType": "Travaille sur",
"relationshipKey": "NFR0002220803|NFR0002217824|271568|2009-08-04",
"isPrimary": false,
"status": "In-Active",
"child": "NFR0002217824",
"isDuplicate": false
},
{
"endDate": "2010-06-08",
"startDate": "2009-08-04",
"parent": "NFR0002220803",
"role": "Vice-Président",
"relationShipType": "Travaille sur",
"relationshipKey": "NFR0002220803|NFR0002217825|271568|2009-08-04",
"isPrimary": false,
"status": "In-Active",
"child": "NFR0002217825",
"isDuplicate": false
},
{
"endDate": "2010-06-08",
"startDate": "2009-08-04",
"parent": "NFR0002220803",
"role": "Vice-Président",
"relationShipType": "Travaille sur",
"relationshipKey": "NFR0002220803|NFR0002217826|271568|2009-08-04",
"isPrimary": false,
"status": "In-Active",
"child": "NFR0002217826",
"isDuplicate": false
}
],
"@timestamp": "2021-11-11T06:49:57.704Z",
"department": "Instances, Commissions",
"dispensingFlag": null,
"hcoType": "divers",
"specialties": [
{
"speciality": "Conseil régional",
"type": "Primary Specialty",
"status": "Active"
}
],
"hcoSubType": "Institutions administratives et politiques",
"technicalData": {
"createdOn": "2021-10-19T17:15:46",
"createdBy": "Techadmin Techadmin (techadmin)",
"lastUpdateOn": "2021-11-08T15:04:01",
"updatedBy": "Techadmin Techadmin (techadmin)"
},
"organizationName": "COMMISSION PERMANENTE",
"customerAddresses": [
{
"region": "France Métropole",
"stateOrProvince": "MOSELLE",
"microBrick": null,
"startDate": "2009-08-04",
"addressLine3": null,
"height": null,
"addressKey": "NFR0002220803|AFR0000453829|200148|2009-08-04",
"latitude": null,
"brick": "57MET",
"isPrimary": true,
"addressId": "AFR0000453829",
"countryName": "France",
"endDate": "3999-12-31",
"addressLine2": null,
"longitude": null,
"masterAddress": null,
"addressLine1": "1 PLACE GABRIEL HOCQUARD",
"postalCode": "57000",
"addressType": "Primary address",
"geoCoordinates": null,
"status": "Active",
"suburb": null,
"city": "METZ"
}
],
"marketAccessFlag": null,
"noOfPhysicians": null,
"privacyLawStatus": false,
"statusDetail": "Closed",
"customerRecordType": "Health Care Organization",
"identities": [
{
"effectiveDate": "2021-11-08T15:02:50",
"value": "WFRH00000001",
"type": "OneKey",
"expirationDate": null
}
],
"topCustomerName": null,
"@version": "1",
"name": "COMMISSION PERMANENTE",
"customerType": "Organization",
"alias": null,
"country": "France",
"meansOfContact": [
],
"status": "Inactive",
"customerId": "NFR0002220803"
}
}
]
}
}
Toto je dotaz, zkoušel jsem hledat
GET /customer-fr/_search
{
"query": {
"bool": {
"must": {
"match_all": {
}
},
"filter": {
"bool": {
"must": [
{
"status": "Inactive"
}
]
}
}
}
}