Alexander Korotkov wrote:
On Thu, Feb 16, 2012 at 12:34 AM, Jay Levitt <jay.lev...@gmail.com
<mailto:jay.lev...@gmail.com>> wrote:

    - But a dimension might be in any domain, not just floats
    - The distance along each dimension is a domain-specific function

What exact domains do you expect? Some domains could appear to be quite hard
for index-based similarity search using GiST (for example, sets, strings etc.).

Oh, nothing nearly so complex, and (to Tom's point) no composite types, either. Right now we have demographics like gender, geolocation, and birthdate; I think any domain will be a type that's easily expressible in linear terms. I was thinking in domains rather than types because there isn't one distance function for "date" or "float"; me.birthdate <-> you.birthdate "birthdate" is normalized to a different curve than now() <-> posting_date, and raw_score <-> raw_score would differ from z_score <-> z_score.

It would have been elegant to express that distance with <->, but since domains can't have operators, I can create distance(this, other) functions for each domain. It just won't look as pretty!

Jay

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to