| « Sore loser: Connie Sonne (JREF Challenge at TAM7) | Odd: Swearing can reduce the feeling of pain » |
Removing a full text index on a server
I've whipped up this little code after searching the web on how to use the C-api.
It's actually easier then I thought, but I'm sharing it anyway.
Download the code here: removefti.lss
It's actually easier then I thought, but I'm sharing it anyway.
ls2html was brought to you by nsftools.com'Remove FTI: Declare Function FTDeleteIndex Lib "nnotes.dll" (Byval hDB As Long) As Integer Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDB As Long) As Integer Declare Function NSFDbOpen Lib "nnotes.dll" (Byval filepath As String, DB As Long) As Integer Declare Function OSPathNetConstruct Lib "NNOTES" Alias "OSPathNetConstruct" _ ( Byval NullPort As Long, Byval Server As String, Byval FIle As String, _ Byval PathNet As String) As Integer Sub Initialize Dim Bufferstr As String Dim ReturnCodel As Long Dim hDB As Long Dim errorstr As String Dim pathName As String pathName = String(256, " ") Call OSPathNetConstruct(0, SERVER, PATH, pathName) Dim result As Integer 'open the dataase result = NSFDbOpen(pathName, hDb) If Result <> 0 Then errorstr="An error occurred in the main routine calling the API function NSFDbOpen." & Chr$(10) & "The return code was " & Trim$(Str$(ReturnCodel)) & "." Exit Sub End If 'Delete the index ReturnCodel = FTDeleteIndex(hDB) If ReturnCodel <> 0 Then errorstr="An error occurred in the main routine calling the API function FTDeleteIndex." & Chr$(10) & "The return code was " & Trim$(Str$(ReturnCodel)) & "." Call NSFDbClose(hDB) Exit Sub End If 'Close the database ReturnCodel = NSFDbClose(hDB) End Sub
Download the code here: removefti.lss
5 comments
Comment from: ADE [Visitor]
Yes, this is a good tool, but in the administrator client, you can select all databases and right clic, delete all indexe. After that, introduice in notes.ini serveur thos variables :
UPDATE_NO_FULLTEXT=1
and
FT_FLY_INDEX_OFF=1
Best regards
Ade
UPDATE_NO_FULLTEXT=1
and
FT_FLY_INDEX_OFF=1
Best regards
Ade
12/26/11 @ 15:52
Hi Ade
that's also true, but this can work scheduled if required.
that's also true, but this can work scheduled if required.
12/27/11 @ 11:01
Do you have a spam issue on this blog; I also am a blogger, and I was curious about your situation; many of us have developed some nice methods and we
are looking to trade methods with other folks, be sure to shoot me an e-mail if interested.
are looking to trade methods with other folks, be sure to shoot me an e-mail if interested.
04/02/13 @ 22:28
Big spam problem at the moment Tam, even the Turing test is not helping. I'll have to upgrae to the latest version I think.
04/03/13 @ 08:57