Fix indices algorithm to handle non-matches.
Add edge-case test.
Choose to score a blank query as 1 instead of 0.

This is somewhat arbitrary but consistent with selecta.