i would like to know if it is possible to compare field.value with different indexes i mean for example i have index1 and index2 and each index has fields so i want to compare field value of index1 with field value on index2 I don't know if it's possible
That sounds a lot like a join, which Elasticsearch does not support. It may help if you provide some additional information around the high level problem you are looking to solve so someone here may be able to suggest alternate approaches.
without more details about your problem I would say that your problem is related with denormalization. It is a technique used to improve the queries (performance and response time) by adding some redundant data. It means that probably you should have your two indices merged in one.
If that is not an option for you, you could do a manual join with your client... but not recommended.
It would help if you provide more details about your problem, context...