Searchico
A very fast full-text search in JavaScript
Install
From NPM
npm install searchico
From GitHub
npm install git+https://github.com/illusion1993/searchico.git
Documentation
Init
var searchico = ;var collection = ;var results1 = collection;var results2 = collection; /* results1 = [ { id: 1, name: 'Alex Carter', location: 'New Orleans' }, { id: 2, name: 'Alexey Hopper', location: 'Lake Charles' }] results2 = [ { id: 1, name: 'Alex Carter', location: 'New Orleans' }, { id: 3, name: 'Jack Tyson', location: 'New Orleans' }] */
Options
var searchico = ;var options = case_sensitive: true // false by default hyper_indexing: true // true by default, high speed search, memory intensive hyper_caching: true // false by default, even faster, memory intensive replace_umlauts: true // true by default, allows finding umlauts with their english alphabets deep: false // true by default, allows indexing objects deeply keys: 'id' 'name' // name of keys in objects to add into index;var data = id: 1 name: 'Alex Carter' location: 'New Orleans' id: 2 name: 'Alexey Hopper' location: 'Lake Charles' id: 3 name: 'Jack Tyson' location: 'New Orleans' id: 4 name: 'Tyler Miles' location: 'Camas' ;var collection = ;var results = collection;
Usages
- Object arraysvar data = id:2 name: 'Apple' id: 14 name: 'Orange' ;var collection = ;
- String Arraysvar data = 'Apple' 'Orange' 'Guava';var collection = ;
- Mixed Arraysvar data = 'Apple' id: 14 name: 'Orange' 'Guava';var collection = ;