in src/main/scala/datastore/ElasticsearchRepo.scala [291:308]
override def tagsForList(tagIdList:Seq[String], maybeSection: Option[String], tagType:Option[String], maybeCategory:Option[String], maybeReferences:Option[String]):Future[Seq[Tag]] = {
val tagIdMatches = tagIdList.map(MatchQuery("id", _))
val response = client.execute {
val restrictions = tagQueryParams(None, maybeSection, tagType, maybeCategory, maybeReferences, None, None)
if(restrictions.nonEmpty) {
search("tag").query(
BoolQuery(
must=restrictions :+ BoolQuery(should=tagIdMatches)
)
)
} else {
search("tag").query(BoolQuery(should=tagIdMatches))
}
}
marshalTags(response)
}