This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10000 - Allow expressions in addition to keyPaths when creating indexes
Summary: Allow expressions in addition to keyPaths when creating indexes
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Nikunj Mehta
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-23 19:16 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2015-08-10 20:33 UTC (History)
7 users (show)

See Also:


Attachments

Description Jonas Sicking (Not reading bugmail) 2010-06-23 19:16:20 UTC
For details, see
http://lists.w3.org/Archives/Public/public-webapps/2010AprJun/1094.html

The idea is to allow a full javascript expression to be passed to createIndex. This expression would be run every time a new or modified object is stored in an objectStore. The expression would produce zero or more index values that should be associated with the stored object.

There's lots of details to figure out still, such as the syntax of the expression and which context it will be running in. And how non-js implementations would supply this expression.
Comment 1 Jeremy Orlow 2010-06-23 19:54:09 UTC
I'm not convinced this is a good idea.  Will try to send my feedback to the list in the next 24 hrs.
Comment 2 Jeremy Orlow 2010-12-10 12:24:21 UTC
Are you planning on working on this soon?  If not, maybe you should assign it to dave.null@w3.org
Comment 3 Jonas Sicking (Not reading bugmail) 2011-03-08 03:15:55 UTC
Resolving this as LATER so that we can pick it up once we start working on v2
Comment 4 Joshua Bell 2012-11-13 21:31:38 UTC
This seems like the right IDB building block for implementing "full text search", with implementations providing other pieces like word splitting and stemming.

Agreed about the details. Although something like "String($).split(/\s+/)" would work for toy cases (assuming JS), any real implementation would require expressions to have access to non-trivial library functions, or access to non-trivial host objects.
Comment 5 Joshua Bell 2015-08-10 20:33:23 UTC
Moved to https://github.com/w3c/IndexedDB/issues/33