Prevent search index updates of nonexistant pages

This also removed textLen as it was deprecated and no longer used.

Bug: 56020
Change-Id: I7ee22d5c1cc9c83c98548a2b9eb97dc3a112be9c