indexer: Use String#encode instead of String#force_encoding
indexer: Remove unused variables