Re: TSearch and rankings - Mailing list pgsql-general

From Teodor Sigaev
Subject Re: TSearch and rankings
Date
Msg-id 4027B13A.9000204@sigaev.ru
Whole thread Raw
In response to Re: TSearch and rankings  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-general

Oleg Bartunov wrote:
> On Mon, 9 Feb 2004, Bas Scheffers wrote:
>
>
>>Teodor Sigaev said:
>>
>>>(foo&bar)|(foo&bar&doh)
>>>I think, it's what you want.
>>
>>That simple huh? Can become a bit complicated, doing an OR for all the
>>different combinations, but a quick test I just did did show a higher
>>ranking for the documents that matched the larger query. And quite usable
>>in my application.
>>
>>Do big queries have a significant inpact on search performance? (this is
>>something that is important!)
>
>
> Sure :( In degenerated case you end with query like (word1|word2|word3|..|wordN)
> and it's equivalent running N searches with single word query, which isn't
> effective. Intrinsically, tsearch2 is much faster for long AND queries,
> which is opposite to standard search engines based on inverted indexes.

Ugh. The performance for complex query such as
(foo&bar)|(foo&bar&doh)|(foo&bar&doh&other)
will be equals to simple query foo&bar, because other variants is a stronger
that simplest variant. Performance is defined by number of page readed (we
suppose that CPU is much faster than disks) and if more ANDed words in query
than smaller number of readed pages.




--
Teodor Sigaev                                  E-mail: teodor@sigaev.ru

pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: TSearch and rankings
Next
From: Tom Lane
Date:
Subject: Re: functions and temporary tables