How to get char indices from text parser | tsvector?

Поиск
Список
Период
Сортировка
Искать

How to get char indices from text parser | tsvector?

От:
Roman Gurinovich <roman.gurinovich@xpansa.com>
Дата:
Hi all, 

is there any possibility to get char "coordinates", not only token "coordinates" from tsvector or, basically, text parser? Like in Elasticsearch 


GET _analyze?text=This fox is brown&analyzer=english
{
"tokens": [
{
  "token": "fox",
  "start_offset": 5,
  "end_offset": 8,

  "type": "",
  "position": 1
}

while in PostgreSQL 

SELECT to_tsvector('This fox is brown')
'brown':4 'fox':2 'is':3 'this':1



--

Best Regards,
Roman Gurinovich


FAQ