text-prefix search in 9.4's JSONB

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: text-prefix search in 9.4's JSONB
Date: 2014-07-07 09:28:34
Message-ID: VisenaEmail.30.15c221b911eedc69.147101d7852@tc7-on
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all.   I'm excited about 9.4's new JSONB and search-performance.   Is it
possible to combine tsearch's prefix-search with the new JSONB-format?  
Something like this (pseudo-code): SELECT '{"subject": "visena"}'::jsonb @> 
'{"subject": to_tsquery('simple', '(vise:*|office:*)')}';   and have the above
query match documents where subject contains the prefixes "vise" and "office",
which would match subject="visena" and subject="officenet"   Would be ultimate
cool if this was possible!   Thanks.   -- Andreas Jospeh Krogh CTO / Partner -
Visena AS Mobile: +47 909 56 963 andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com> <https://www.visena.com>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2014-07-07 10:48:31 Re: conditional IF statements in postgresql
Previous Message David G Johnston 2014-07-07 03:47:19 Re: conditional IF statements in postgresql