Re: Designing an extension for feature-space similarity search - Mailing list pgsql-hackers

From Jay Levitt
Subject Re: Designing an extension for feature-space similarity search
Date
Msg-id 4F3D38F9.4090301@gmail.com
Whole thread Raw
In response to Re: Designing an extension for feature-space similarity search  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
Alexander Korotkov wrote:
> On Thu, Feb 16, 2012 at 12:34 AM, Jay Levitt <jay.levitt@gmail.com
> <mailto:jay.levitt@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


pgsql-hackers by date:

Previous
From: Kohei KaiGai
Date:
Subject: Re: pgsql_fdw, FDW for PostgreSQL server
Next
From: Dan Scales
Date:
Subject: possible new option for wal_sync_method