Creating an Indexer Helper

To make it easier to work with the Windows Index, I created a JavaScript Indexer helper object. This helper has methods for inserting new content in the index, deleting content from the index, and querying the index.

Note

You can find all of the code discussed in this section in the Chapter13\SearchIndex solution in the GitHub repository that accompanies this book.

The complete code for this helper object is contained in Listing 13.9.

LISTING 13.9 The IndexerHelper Object (js\indexerHelper.js)

(function () {    "use strict";    var props = Windows.Storage.SystemProperties;    // Add new content to the index    function add(id, value, itemNameDisplay, keywords, comment) {        // Get ...

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.