Dennis' Domino Blog
« Sore loser: Connie Sonne (JREF Challenge at TAM7)Odd: Swearing can reduce the feeling of pain »

Removing a full text index on a server

  07/13/09 11:42, by dennisvr, Categories: SNTT, Lotus, Development
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.

'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
ls2html was brought to you by nsftools.com

Download the code here: removefti.lss

5 comments

User ratings
5 star:
 
(4)
4 star:
 
(0)
3 star:
 
(0)
2 star:
 
(0)
1 star:
 
(0)
4 ratings
Average user rating:
5.0 stars
(5.0)
Comment from: Mark
Thanks for the link.
10/26/10 @ 21:35
Comment from: ADE
5 stars
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
12/26/11 @ 15:52
Comment from: dennisvr  
5 stars
Hi Ade that's also true, but this can work scheduled if required.
12/27/11 @ 11:01
Comment from: Tam
5 stars
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.
04/02/13 @ 22:28
Comment from: dennisvr  
5 stars
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
Yet another Domino/Websphere Admin blog.

About me:
Lotus Notes/Domino Admin
Websphere Commerce Admin
sceptic
critic



Search

  XML Feeds

Planet Lotus

blog soft
 

©2014 by Dennis van Remortel

Contact | Help | Blog template by Asevo | blog tool | dedicated servers | authors