gbv / ng-suggest

AngularJS module to provide Typeahead via OpenSearch Suggestions
http://gbv.github.io/ng-suggest/
9 stars 4 forks source link

How to add api for searching local websql ? #6

Closed steve21124 closed 10 years ago

nichtich commented 10 years ago

I guess this can be implemented very conveniently with https://github.com/ocombe/angular-localForage or a similar module - but first the code needs some cleanup to get a first 0.1.0 release!

nichtich commented 10 years ago

Web SQL is neither supported by Firefox nor IE so it rather looks like a dead end:http://caniuse.com/#search=sql-storage Getting search suggestions via simple key-value stores, however seems rather complicated, because there is no substring search operation, just lookup by key.

steve21124 commented 10 years ago

Thanks for the heads up. My target is mobile. so if it works for chrome or Safari. it is good. though for ios 7 the disk size cannot be greater than 5mb . and thanks for the alternative pointer angular local forage

steve21124 commented 10 years ago

hmmm... probably, I need to change instead of using websql. use indexDB instead since it is future format

nichtich commented 10 years ago

Can you describe your use case? How [many] suggestions are initially given? I've got an idea how to implement right-truncated search with simple key-value store.

On 2. Mai 2014 17:39:23 MESZ, Steve notifications@github.com wrote:

hmmm... probably, I need to change instead of using websql. use indexDB instead since it is future format


Reply to this email directly or view it on GitHub: https://github.com/gbv/ng-suggest/issues/6#issuecomment-42045209

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

steve21124 commented 10 years ago

not too many suggestion at most 30 rows. thought db size might matter probably around 5000 rows. thanks. my use case is. downloading from google spreadsheet. store it to indexdb and do search suggest. thats why i plan to use your ng-suggest

nichtich commented 10 years ago

Ok with indexeddb suggestions should be easier to implement by using key ranges for right-truncated search. Passing an object store (aka database table) to ng-suggest should be enough after this feature has been implemented.

On 3. Mai 2014 18:21:34 MESZ, Steve notifications@github.com wrote:

not too many suggestion at most 30 rows. thought db size might matter probably around 5000 rows. thanks. my use case is. downloading from google spreadsheet. store it to indexdb and do google suggest. thats why i plan to use your ng-suggest


Reply to this email directly or view it on GitHub: https://github.com/gbv/ng-suggest/issues/6#issuecomment-42109166

Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

steve21124 commented 10 years ago

yap. agree. indexdb is good idea. "Passing an object store (aka database table) to ng-suggest should be enough after this feature has been implemented." Cool. That's what i am looking for .... Thanks