Getting Size Of Full Text Search Index

This function retrieves the size of a FTS index for a database. By passing the
function a NotesDatabase object, it wil return the size of the index in bytes.

For example, if you wanted to display the size of the FTS index for the current
database, in a format consistent with the value in File - Database -
Properties, you can use this button code:

Sub Click(Source As Button)
Dim s As New NotesSession
Dim fts&, adj&

fts&=GetFTSize(s.CurrentDatabase)

If fts& > 0 Then
' convert number to format displayed in File - Database - Properties
adj&=Fix(fts& / 1024)

If adj& > 999 Then
Msgbox "Full text size: " & Fix(adj& / 1000) & " MB", 0, "FTS Size
Sample"
Else
Msgbox "Full text size: " & adj& & " KB", 0, "FTS Size Sample"
End If
Else
Msgbox "This database has no FTS index", 48, "FTS Size Sample"
End If
End Sub
' (Declarations)
Declare Sub OSPathNetConstruct Lib "nnotes" (Byval portName As String, Byval
ServerName As String, Byval FileName As String, Byval retPathName As String)
Declare Function NSFDbFTSizeGet Lib "nnotes" (Byval Filename As String, FTSize
As Long) As Integer

Function GetFTSize(db As NotesDatabase) As Long
Dim path$
Dim fts&

path$=Space$(256)

' create an API-friendly path
OSPathNetConstruct "", db.Server, db.FilePath, path$
Call NSFDbFTSizeGet(path$, fts&)

' returns 0 if no index; otherwise, size of .ft directory (in bytes)
GetFTSize=fts&
End Function
This was first published in November 2000

Dig deeper on Domino Resources - Part 4

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close