Re: [PROPOSAL] Shared Ispell dictionaries

Поиск
Список
Период
Сортировка
От Arthur Zakirov
Тема Re: [PROPOSAL] Shared Ispell dictionaries
Дата
Msg-id 20171226182237.GA1291@arthur.localdomain
обсуждение исходный текст
Ответ на Re: [PROPOSAL] Shared Ispell dictionaries  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: [PROPOSAL] Shared Ispell dictionaries
Список pgsql-hackers
Thank you for your feedback.

On Tue, Dec 26, 2017 at 01:55:57PM -0300, Alvaro Herrera wrote:
> So what are you going to use instead?

For example, AffixNode and AffixNodeData represent prefix tree of an
affix list. They are accessed by Suffix and Prefix pointers of
IspellDict struct now. Instead all affix nodes should be placed into an
array and accessed by an offset. Suffix array goes first, Prefix array
goes after. AffixNodeData will access to a child node by an offset too.

AffixNodeData struct has the array of pointers to AFFIX struct. These
array with all AFFIX data can be stored within AffixNodeData. Or
AffixNodeData can have an array of indexes to a single AFFIX array,
which stored within IspellDict before or after Suffix and Prefix.

Same for prefix tree of a word list, represented by SPNode struct. It
might by stored as an array after the Prefix array.

AffixData and CompoundAffix arrays go after them.

To allocate IspellDict in this case it is necessary to calculate needed
memory size. I think arrays mentioned above will be built first then
memcpy'ed into IspellDict, if it won't take much time.

Hope it makes sense and is reasonable.

> 
> So this will be a large patch not submitted to 2018-01?  Depending on
> size/complexity I'm not sure it's OK to submit 2018-03 only -- it may be
> too late.
> 

Oh, I see. I try to prepare the patch while 2018-01 is open.

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [PROPOSAL] Shared Ispell dictionaries
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PROPOSAL] Shared Ispell dictionaries