You can rebuild a valid index using ALTER
INDEX
. Rebuilding an index does not allow most index settings to be changed. You might rebuild an index when you want to index with a new preference. Generally, there is no advantage in rebuilding an index over dropping it and re-creating it with CREATE
INDEX
.
"Re-creating an Index" for information about changing index settings
Example: Rebuilding an Index
The following statement rebuilds the index, replacing the lexer preference with my_lexer
.
ALTER INDEX newsindex REBUILD PARAMETERS('replace lexer my_lexer');