Fulltext index “immediate” does not work with XPages in the web?

断了今生、忘了曾经 提交于 2019-12-06 05:15:28

Somehting has gone worng with full text immediate for the last few server versions. There is probably some new INI setting but getting admins to do this is frustrating, so best thing to do is to get the database updated manually using lotusscript or java. It doesn't seem to matter if you ask for lots of requests.

db.updateFTIndex(true)

You can count the number of iunindexed documents forst if you like.

Dim session As New NotesSession
Dim db As NotesDatabase

Set db = session.CurrentDatabase



Print "Last Indexed:<br>" & db.LastFTIndexed & "<br>"

Dim ndtnow As New NotesDateTime(Now)
Dim ndtli As New NotesDateTime(db.LastFTIndexed )

Print Cdbl( ndtnow.TimeDifferenceDouble(ndtli)/60 ) & " minutes ago." & "<br><br>"

Dim T As New NotesDateTime("") 
Dim UnindexedCol As NotesDocumentCollection 


T.LSLocalTime = db.LastFTIndexed 
Set UnindexedCol = db.Search({@All}, T, 0) 
Print "Unindexed changed or new documents: " &  UnindexedCol.count & "<br><br>"

I have to say that it DOES work with XPages/Web. It just looked like it didn't work, because it takes up to 15 minutes until the ft index gets updated, and the Update.FulltextList statistic seems to lag behind the current situation a lot.

15 minutes is not my interpretation of "immediate" since the indexer has no load at all on that server, but that's a different story.

I'm not an admin, but this looks very useful http://www-01.ibm.com/support/knowledgecenter/SSKTMJ_9.0.1/admin/admn_indexertasksupdateandupdall_r.dita.

One part I notice is:

When a view or folder change is recorded in the queue, Update waits approximately 15 minutes before updating all view indexes in the database so that the update can include any other database changes made during the 15-minute period. After updating view indexes in a database, it then updates all databases that have full-text search indexes set for immediate or hourly updates.

It's worth noting the Indexer task updates view indexes as well as the full text indexes. You can split them onto separate threads using UPDATE_FULLTEXT_THREAD=1 in notes.ini. With the more recent versions of Domino you can move the full text indexes onto a separate drive. I'm not sure if that improves update performance.

Please don't use LotusScript to update the full text index in an XPages context. I can't stress that strongly enough. Also, if you want to update the full text index, I'd recommend using the parameter false instead of true. The database should always have a full text index in place when it's set up, but you can easily check that.

In recent projects I've been using Jesse Gallagher's frostillicus framework. I notice that the BasicDocumentController class updates the full text index on save of each document, with this code:

if (database.isFTIndexed()) {
    database.updateFTIndex(false);
}

The 15 minute delay in automatic 'immediate' full text updates is fairly well known in Domino Admin circles. You could try creating a Program document for the server. Use a command something like this:

Updall -F [database_name]/[folder]

The -F switch ensures Updall only updates FT indexes, not views (which are generally speaking updated instantly unless programmed otherwise).

We have a number of servers that runs this every 5 minutes during working hours and it helps. Bear in mind it will create a LOT of I/O on a busy server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!