Immediate UpdateFTIndex

So your code relies heavily on fulltext index for searches.  So you press Update Index to force it a little.  Nothing happens.  Or maybe an agent forces it a little.  No immediate succes.

I could be wrong, but it looks like in the browser you can really really have it updated immediately.  I created an empty XPage, with only one computed field with the following SSJS:

database.updateFTIndex(false)

Preview in browser and BLAM: all documents are indexed!

1 Comment

  1. Yes, we noticed the same. But it comes at a price: the server doesn’t like it when you use it too often. Especially when the indexer is running, and you try to activate it again. Unfortunately, there is no way to find out if the indexer is running.
    IMHO, the whole idea of UpdateFTIndex is ridiculous. Why does a developer have to be concerned about the damned full-text index? I understand that the index needs to be refreshed from time to time, but why do I have to know about it? In my view, an FTSearch should be able to look first in the indexed documents, followed by a search through the unindexed documents. If there are too many unindexed documents, it should start an update and then do a search.
    But here’s what the community thinks about my idea:
    http://ideajam.net/ideajam/p/ij.nsf/0/C84C6E5E7D6DCF224A2579AB0060FE1F?OpenDocument

    Reply

Leave a Reply to Sjef Bosman Cancel reply

Your email address will not be published. Required fields are marked *

22 − = 16

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>