i am a little confused, so my apologies if this is covered in the docs somewhere. i am inserting text into a fullproof search engine and the callback for injectDocument() is getting called. however when i try to do a lookup() on a word in the document it can take several minutes before it actually comes back with a match. (until then, the result set is false.) my questions are:
is this long wait while it is actually building the index?
if so, is there a way to speed it up (the text is only a few hundred words long)
is there a callback i can set somewhere for when the entire index is ready to be searched?
(the function _doneIndexing() is called almost immediately after the inject happens, for what it is worth.) i wonder if it has to do with me doing multiple iterations of injecting documents? i step through dozens of nodes in a loop and inject the text content from each via the above method. i am trying to discern why i am getting these long delays and some strange lookup results.
i am a little confused, so my apologies if this is covered in the docs somewhere. i am inserting text into a fullproof search engine and the callback for
injectDocument()
is getting called. however when i try to do alookup()
on a word in the document it can take several minutes before it actually comes back with a match. (until then, the result set is false.) my questions are:here is what my code looks like:
and the results, from console (each attempt was done about 15 sec apart):
(the function
_doneIndexing()
is called almost immediately after the inject happens, for what it is worth.) i wonder if it has to do with me doing multiple iterations of injecting documents? i step through dozens of nodes in a loop and inject the text content from each via the above method. i am trying to discern why i am getting these long delays and some strange lookup results.thanks! -jon