Re: Full text: Ispell dictionary - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: Full text: Ispell dictionary
Date
Msg-id CAF4Au4wL-b_ywWp-p1sWHDaLe-PA9=g+MeosdTh=v370binqmA@mail.gmail.com
Whole thread Raw
In response to Re: Full text: Ispell dictionary  (Tim van der Linden <tim@shisaa.jp>)
Responses Re: Full text: Ispell dictionary
List pgsql-general
Tim,

you did answer yourself - don't use ispell :)

On Sat, May 3, 2014 at 1:45 AM, Tim van der Linden <tim@shisaa.jp> wrote:
> On Fri, 2 May 2014 21:12:56 +0400
> Oleg Bartunov <obartunov@gmail.com> wrote:
>
> Hi Oleg
>
> Thanks for the response!
>
>> Yes, it's normal for ispell dictionary, think about morphological dictionary.
>
> Hmm, I see, that makes sense. I thought the morphological aspect of the Ispell only dealt with splitting up compound
words,but it also deals with deriving the word to a more "stem" like form, correct? 
>
> As a last question on this, is there a way to disable this dictionary to emit multiple lexemes?
>
> The reason I am asking is because in my (fairly new) understanding of PostgreSQL's full text it is always best to
haveas few lexemes as possible saved in the vector. This to get smaller indexes and faster matching afterwards. Also,
ifyou run a tsquery afterwards to, you can still employ the power of these multiple lexemes to find a match. 
>
> Or...probably answering my own question...if I do not desire this behavior I should maybe not use Ispell and simply
useanother dictionary :) 
>
> Thanks again.
>
> Cheers,
> Tim
>
>> On Fri, May 2, 2014 at 11:54 AM, Tim van der Linden <tim@shisaa.jp> wrote:
>> > Good morning/afternoon all
>> >
>> > I am currently writing a few articles about PostgreSQL's full text capabilities and have a question about the
Ispelldictionary which I cannot seem to find an answer to. It is probably a very simple issue, so forgive my ignorance. 
>> >
>> > In one article I am explaining about dictionaries and I have setup a sample configuration which maps most token
categoriesto only use a Ispell dictionary (timusan_ispell) which has a default configuration: 
>> >
>> > CREATE TEXT SEARCH DICTIONARY timusan_ispell (
>> >         TEMPLATE = ispell,
>> >         DictFile = en_us,
>> >         AffFile = en_us,
>> >         StopWords = english
>> > );
>> >
>> > When I run a simple query like "SELECT to_tsvector('timusan-ispell','smiling')" I get back the following tsvector:
>> >
>> > 'smile':1 'smiling':1
>> >
>> > As you can see I get two lexemes with the same pointer.
>> > The question here is: why does this happen?
>> >
>> > Is it normal behavior for the Ispell dictionary to emit multiple lexemes for a single token? And if so, is this
efficient?I mean, why could it not simply save one lexeme 'smile' which (same as the snowball dictionary) would match
'smiling'as well if later matched with the accompanying tsquery? 
>> >
>> > Thanks!
>> >
>> > Cheers,
>> > Tim
>> >
>> >
>> > --
>> > Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>> > To make changes to your subscription:
>> > http://www.postgresql.org/mailpref/pgsql-general
>
>
> --
> Tim van der Linden <tim@shisaa.jp>


pgsql-general by date:

Previous
From: Tim van der Linden
Date:
Subject: Re: Full text: Ispell dictionary
Next
From: Oleg Bartunov
Date:
Subject: Re: Manipulating jsonb