create inverted index which consist of words mapping to files contain this words. then i want to encrypt this inverted index by using some encryption algorithm.
Additional idea: I see other contributors to your discussion saying you should try methods, but maybe they don't say why or how.
Here is one way more specific for your problem.
You surely have as a data structure in your programme a table associating indices and words. Start by encrypting this table. After all, protecting sensitive data against unauthorised access is always sound.
Now this is step 1, because it assumes the access is either all (the full table) or none (zero access).
In real life, not all people or agents need to see everything, so you'll go for step 2:
-partition words and indices in subsets of associations of words and indices.
-encrypt subsets
In this way access is granted to those who need to know only...
My suggestion is to use some advanced processes like Genetic algorithm's operators (Crossover, Mutation e.t.c.), Random number concept and neural network concept with basic encryption methods ( DES, AES).