Skip to content

Instantly share code, notes, and snippets.

@hpainter
Created March 29, 2017 14:10
Show Gist options
  • Save hpainter/bb561f26f40f002abb1ab92d02c3a668 to your computer and use it in GitHub Desktop.
Save hpainter/bb561f26f40f002abb1ab92d02c3a668 to your computer and use it in GitHub Desktop.
// in our last episode...
const colleague_ids = [100,101,102,4,8888333777];
// meanwhile, back at appointments.js line 179:
if(params.isOrgRelated){
query.bool.must.push({
bool: {
should: [
{term: { "subject_id": colleague_ids }},
{nested: {
path: "creator",
query: { term: {"creator.person_id": colleague_ids}}
}},
{nested: {
path: "specialist.person",
query: { term: {"specialist.person.id": colleague_ids}}
}}
]
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment