Thread: How to get char indices from text parser | tsvector?

How to get char indices from text parser | tsvector?

From
Roman Gurinovich
Date:
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