RemoveIndex method (NotesDominoQuery - LotusScript)

Removes an index (Domino view) that is optimized for DQL query terms. RemoveIndex is very powerful and can remove production views. Take care in choosing what indexes (views) to remove.

Defined in

NotesDominoQuery

Syntax

NotesDominoQuery RemoveIndex(String IndexName)

Parameters

IndexName

String. The name of the index to remove.

Removes a hidden view if you omit the parentheses in the index name and there is no visible view with the same name. For example, if "myview" and "(myview)" exist, "myview" deletes only "myview." But if only "(myview)" exists, "myview" deletes "(myview)". Naming your index views differently than the other views in the database is recommended.

Return value

None

Example

 Dim IndexName As String
    Dim FieldName As Variant
    
    Dim Session As New NotesSession
    Dim TheQuery As NotesDominoQuery
    Dim db As NotesDatabase

    Set db = Session.CurrentDatabase
    IndexName = "idx1"
    ' Remove the index
    Call TheQuery.RemoveIndex(IndexName)

Language cross-reference

removeIndex method (DominoQuery - Java)