Fix TermIndexTest for all database collations

Change-Id: Icc7fc3b0eb5435a56beee2fdfa3c0b570f35d9bc