Re: Let's play bash the search engine

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, Henrik Zagerholm <henke(at)mac(dot)se>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Let's play bash the search engine
Date: 2006-12-19 10:13:16
Message-ID: Pine.LNX.4.64.0612191310390.16338@sn.sai.msu.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 19 Dec 2006, Magnus Hagander wrote:

> On Tue, Dec 19, 2006 at 01:48:22PM +0530, Gurjeet Singh wrote:
>> On 12/19/06, Henrik Zagerholm <henke(at)mac(dot)se> wrote:
>>>
>>> Hello,
>>>
>>> Searching after "tsearch"
>>> 5. PostgreSQL: Documentation: Manuals: PostgreSQL 7.4: Examples [0.1]
>>> ...tsearch and tsearch2Full text
>>> indexingPrevHomeNextLimitationsUpPage Files User Comments No comments
>>> could be found for this...
>>> http://www.postgresql.org/docs/7.4/interactive/examples.html
>>>
>>> Searching after "tsearch2"
>>> An error occured while searching.
>>>
>>> Searching after "tsearch2full"
>>> An error occured while searching.
>>
>>
>> This error can be generalized to the reg-ex [::alpha::]+[::digit::]+
>> Examples:
>> A1
>> A2 etc...
>>
>> Why is it so? =)
>
> Seems to_tsvecto() returns NULL for tsearch2 or for, as you say,
> anything that ends in a digit.
>
> Oleg, can you comment on why this is happening? What can we do to fix
> that?

Most probably, token type 'word' just doesn't indexed. If you
didnt' correct this from pgweb configuration:

-- we won't index/search some tokens
update pg_ts_cfgmap set dict_name = NULL
where tok_alias in ('email', 'url', 'sfloat', 'uri', 'float','word')
and ts_name = 'pg';

>
> //Magnus
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Udo Zubel 2006-12-19 10:20:35 inheritance
Previous Message Hannes Dorbath 2006-12-19 09:28:07 Help compile pgmemcache against PG 8.2