 
         invertedIndex = searchlight.index.invert index
 
-        searchlight.redis.set config, invertedIndex, (err) ->
+        searchlight.redis.rebuild config, invertedIndex, (err) ->
             throw err if err?
 
             searchlight.redis.search config, ['what', 'banana'], (err, results) ->

        invertedIndex = searchlight.index.invert index
        invertedIndex2 = searchlight.index.invert index2

        searchlight.redis.set config, invertedIndex, (err) ->
            throw err if err?

            searchlight.redis.set config, invertedIndex2, (err) ->
                throw err if err?

                searchlight.redis.get config, (err, storedIndex) ->


        invertedIndex = searchlight.index.invert index

        searchlight.redis.rebuild config, invertedIndex, (err) ->
            throw err if err?

            searchlight.redis.search config, ['it', 'is'], (err, results) ->
