Tests for inverted index and bug fixes in inverted index custom parameters