From: | Chris Roffler <croffler(at)earthlink(dot)net> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Text search |
Date: | 2010-03-16 12:36:25 |
Message-ID: | 3984722a1003160536y751b58afu44fba25753d490db@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard
I tried all that and you can see it on this thread, there are some
limitations on indexs on xpath work
http://archives.postgresql.org/pgsql-general/2010-03/msg00270.php
<http://archives.postgresql.org/pgsql-general/2010-03/msg00270.php>
On Tue, Mar 16, 2010 at 2:21 PM, Richard Huxton <dev(at)archonet(dot)com> wrote:
> On 16/03/10 10:29, Chris Roffler wrote:
>
>> I have a text column in a table. We store XML in this column. Now I want
>> to
>> search for tags and values
>>
>
> select * from xxxx where to_tsvector('english',xml_column) @@
>> to_tsquery('<name>Citi
>> Bank</name>')
>>
>> This works fine but it also works for any tag as long as the name 'Citi
>> Bank' is present.
>>
>> 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 ?
>>
>
> Would you not be better off with an XML data-type if that's how you want to
> treat the data?
> http://www.postgresql.org/docs/8.4/static/datatype-xml.html
> http://www.postgresql.org/docs/8.4/static/functions-xml.html
> http://www.postgresql.org/docs/8.4/static/xml2.html
>
>
> --
> Richard Huxton
> Archonet Ltd
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Arnaud Lesauvage | 2010-03-16 13:05:58 | UPDATE with JOIN not using index |
Previous Message | Richard Huxton | 2010-03-16 12:24:41 | Re: reuse data in existing data directory |