How to get char indices from text parser | tsvector?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to get char indices from text parser | tsvector?

Roman Gurinovich
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