| От | Sushant Sinha |
|---|---|
| Тема | lexeme ordering in tsvector |
| Дата | |
| Msg-id | 1259604322.3191.7.camel@dragflick обсуждение |
| Ответы |
Re: lexeme ordering in tsvector
|
| Список | pgsql-hackers |
It seems like the ordering of lexemes in tsvector has changed from 8.3
to 8.4.
For example in 8.3.1,
postgres=# select to_tsvector('english', 'quit everytime'); to_tsvector
-----------------------'quit':1 'everytim':2
The lexemes are arranged by length and then by string comparison.
In postgres 8.4.1,
select to_tsvector('english', 'quit everytime'); to_tsvector
-----------------------'everytim':2 'quit':1
they are arranged by strncmp and then by length.
I looked in tsvector_op.c, in the function tsCompareString, first memcmp
and then length comparison is done.
Was this change in ordering deliberate?
Wouldn't length comparison be cheaper than memcmp?
-Sushant.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера