From: | "Lawrence Cohan" <lawrencec(at)1shoppingcart(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #4351: Full text search performance |
Date: | 2008-08-12 13:25:25 |
Message-ID: | D125F8AF679AEE4390F3A546AFFA5CB003570782@hermes.1shoppingcart.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Wow - is that easy! How could I miss that when I thought I read all
documentation and knew that full-text search is catalog/language
dependent?
Many thanks and sorry for wasting your time with such a minor thing -
the difference is indeed amazing as the results are back in a few
hundreds of milliseconds on any searched string.
Best regards,
Lawrence Cohan.
-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, August 11, 2008 9:31 PM
To: Lawrence Cohan
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #4351: Full text search performance
"Lawrence Cohan" <Lawrencec(at)1shoppingcart(dot)com> writes:
> -- Is there anything wrong in the sequence below? Sory but I couldn't
figure
> it out by myself from FAQ or from the internet.
> --Added FT indexes as documented for product_name and long_description
> CREATE INDEX idx_ft_products_long_description ON products USING
> gin(to_tsvector('english', long_description));
> CREATE INDEX idx_ft_products_name ON products USING
> gin(to_tsvector('english', product_name));
> analyze products;
> --tried the FT queries below:
> EXPLAIN
> SELECT product_name FROM products
> WHERE to_tsvector(product_name) @@ to_tsquery('album');
That query isn't going to match that index. You'd need to write
... WHERE to_tsvector('english', product_name) @@ to_tsquery('album');
Basically, you can't rely on a default TS configuration when using the
functional-index approach to text searching, because of the restriction
that index contents can't depend on mutable state.
regards, tom lane
Attention:
The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please
contact the sender and delete the material from any system and destroy any copies.
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2008-08-12 13:34:57 | Re: [GENERAL] different results based solely on existence of index (no, seriously) |
Previous Message | shakahshakah@gmail.com | 2008-08-12 12:34:17 | Re: different results based solely on existence of index (no, seriously) |