This is a simple application used to generate index of json formatted files It enables a quick search of words based on the index generated.
The usage of the application is as follows:
- Create a new Index instance using the "new constructor" e.g new Index();
- Call the createIndex(filepath) method of the instance passing in the json filepath as argument
- Call the getIndex(filename) to see the index generated
A full index search searches through all generated indices for all json files
This is executed by calling the *searchIndex(terms)*
Index specifier restricts searches to specific index
*only one* specifier is implemented, further development will include multiple specifiers
Index specifiers utilize the format in:indexname
Search may include either:
- strings containing one or more words e.g. 'I am Alice'
- Array of words e.g ['I', 'am', 'Alice']
Note that to use specifiers in array, the specifier must be the first element in the array
e.g ['in:books', 'Alice', 'powerful']
For string the specifier may occur anywhere in the search string
e.g 'alice in:users powerful' or "alice powerful in:users"