PostgreSql XML Text search

Posted by cro on Stack Overflow See other posts from Stack Overflow or by cro
Published on 2010-03-16T10:04:22Z Indexed on 2010/03/16 10:06 UTC
Read the original article Hit count: 367

I have a text column in a table. We store XML in this column. Now I want to search for tags and values

Example data:
Citi Bank ..... ..... /

I would like to run the following query:

select * from xxxx where to_tsvector('english',xml_column) @@ to_tsquery('Citi Bank')

This works fine but it also works for tags like name1 or no tag.

How do I have to setup my search in order for this to work so I get an exact match for the tag and value ?

© Stack Overflow or respective owner

Related posts about postgresql

Related posts about full-text-search