On my experience, the most useful feature for fulltext search is not on linguistics, but on managing shadow object store.
The main problem is to make consistent between original document object store and its inverted index shadow store. Since indexeddb, do not have event for changes a hook is required for all mutation requests.
The propose function-based indexing will solve this problem without requiring shadow object store.
I also think that, fulltext search api should not be easy, otherwise that feature will be abused - taking up valuable space on user browser. Basically this means, indexeddb api should provide only capability for efficiently storing index and not beyond.
There are many interesting use case for this index key generator feature. For example, we can generate composite key for 1) sorting multiple fields with asc and dec mix, 2) reverse index and 3) compound key with multiEntry index. These are not currently possible. For these use case mutlitEntry may be set to false and simply return a generated key. Whereas, fulltext search index require multiEntry to set true and emit multiple keys.
Another use case is storing meta data as index. For example, caching file to indexeddb, we will also want to store its etag, so that we can invalidate the cache. Index key generator could be useful in this case. But since the generator function is not in local closure, passing extra data to the function will be not straight forward.