postgres store with composite value type, or a better way of attributing an inverted index

Posted by Hassan Syed on Stack Overflow See other posts from Stack Overflow or by Hassan Syed
Published on 2013-11-10T09:36:17Z Indexed on 2013/11/10 9:53 UTC
Read the original article Hit count: 261

Filed under:
|
|

can't seem to figure out the syntax for populating a hstore with a value of composite type -- note: I do not want to convert a record to a hstore.

select hstore('hello => ROW(1,2)');

I know it's something simple; However, google is not my friend today.

use case : custom inverted index.

The data is modelling an inverted index of lexemes, the composite data types are various probabilities related to the lexemes which I will use to implement document clustering. Does anyone know a better way of doing this ? I'm open to using an external system if it allows attaching attributes to key->posting pairs in the inverted index.

I'd use something external if it had solid support for what I am trying to do, I suspect that sticking 3-10k lexemes per tuple and then doing batch processing on them is gonna be nasty as the whole hstore will have to be parsed and converted .

© Stack Overflow or respective owner

Related posts about postgresql

Related posts about hstore