Add department query to course index