amyxzhang / lucy.js

A full-text search engine in the browser
22 stars 3 forks source link

Each field is only allowed to have one index #5

Closed LeaVerou closed 9 years ago

LeaVerou commented 9 years ago

Since objStore.fieldToIndex[field] is only allowed to have one value and is overwritten every time a new index is created, it's impossible to use e.g. the inverted index after generating a prefix trie.

(been working on it, but I think it's useful to log bugs even when we're working on fixing them)

LeaVerou commented 9 years ago

Also, what index corresponds to which objectStore/field is just a property of the object store (objStore.fieldToIndex) that is not stored anywhere and thus, does not persist. I'm afraid the only way around this is to add a special metadata object store for Lucy.js…

LeaVerou commented 9 years ago

Should be fixed with f8996fbc59b19b3e8b9a18ad1e91e4c7329e21e2 (that was painful)