Fix possible crash in full-text search.

Change-Id: I1c86be495aa7ecfb6640c269016040ca06286364