- JavaScript
- AngularJS
- Twitter Bootstrap
- Node.js
- Upload JSON file whose contents you want indexed
- Indices are stored
- Doesn't allow duplicate documents in JSON file
- Keeps history of indexed files
- Separate search queries with any character (punctation, whitespace etc.)
There is a structure to JSON files this app accepts.
A valid JSON file is one that has this (EXACT) structure:
[
{
"title": "Alice in Wonderland",
"text": "Alice falls into a rabbit hole and enters a world full of imagination."
},
{
"title": "The Lord of the Rings: The Fellowship of the Ring.",
"text": "An unusual alliance of man, elf, dwarf, wizard and hobbit seek to destroy a powerful ring."
},
{
"title": "The Lord of the Rings: The Fellowship of the Ring.",
"text": "An unusual alliance of man, elf, dwarf, wizard and hobbit seek to destroy a powerful ring."
}
]
- Click on the 'Upload JSON' button
- The 'Create Index' button and a selection of files uploaded appears after you upload valid file(s)
- Select any file you want indexed and click on the 'Create Index' button
Once you've performed the above, a table is displayed containing a mapping of words and documents they appear in:
For files with duplicates like the example valid file above, duplicates are treated as one.
If, for example, one of the 'The Lord of the Rings: The Fellowship of the Ring.' has different content from the other, the table looks like this:
Documents with the same content but different titles, like in the first picture, are treated as separate documents. 'The Lord of the Rings: The Fellowship of the Ring.' and 'The Lord of the Rings' have the same content
- A selection of indexed files appears after creating indices, together with a search box.
- Select a file whose documents you want to search through and type your search queries. (Search queries can be separated by any character. 'Alice,the-ring/el' is a valid search query.) You can also select 'All Files' to search through all indexed files.
- Live search is implemented. You'll see search results as you type.
Search through all indexed files:
If, after using the app for the first time, you use it again, you don't have to upload already indexed files again to view or search through their indices. The app keeps a history of 15 most recently indexed files for you. A 'Recently Indexed' button appears on the next visit that contains a dropdown that contains your history.
Issue Tracker:
https://github.com/andela-tAdedotun/Inverted-Index/issues
If you are having issues, please let me know. Mail me at: [email protected]