protected ManagedIndex updateIndex ( IndexDefinition oldDefn , IndexDefinition updatedDefn , ManagedIndex existingIndex , String workspaceName , NodeTypes . Supplier nodeTypesSupplier , NodeTypePredicate matcher , IndexFeedback feedback ) { ManagedIndexBuilder builder = getIndexBuilder ( updatedDefn , workspaceName , nodeTypesSupplier , matcher ) ; if ( builder == null ) { throw new UnsupportedOperationException ( "Index providers should either override this method or the #getIndexBuilder method" ) ; } logger ( ) . debug ( "Index provider '{0}' is updating index in workspace '{1}': {2}" , getName ( ) , workspaceName , updatedDefn ) ; existingIndex . shutdown ( true ) ; ManagedIndex index = builder . build ( ) ; if ( index . requiresReindexing ( ) ) { scanWorkspace ( feedback , updatedDefn , workspaceName , index , nodeTypesSupplier ) ; } return index ; }
Method called when this provider needs to update an existing index given the unique pair of workspace name and index definition . An index definition can apply to multiple workspaces and when it is changed this method will be called once for each applicable workspace .