@archana_r ,
You may write both SQL2 or XPath query to find the matching nodes based on the tags.
If we know the more details on the query requirement, we maybe able suggest on how to approach the query.
After you figure out the query, you can use this Oak Index generator tools to create indexes to improve query performance
https://oakutils.appspot.com/generate/index