Postgresql has 4 types of index which are btree (default), hash, GIN and GIST. Which index type suit most for the following scenarios:
- search XML document via xpath. for example
((xpath('/book/id/text()', xml))[1]::text) - Full text search over XML document