Written by

~~ retired but not tired ~~
Article Robert Cemper · Aug 17, 2017 1m read

Fix broken index

the useful content is in the replies
showing the use of $SYSTEM.OBJ.ValidateIndices()

Comments

Robert Cemper · Aug 24, 2017

I did a short test fiddling arouned ^Samples.PersonI
an to demonstrate the output.

SAMPLES>Do $SYSTEM.OBJ.ValidateIndices("Sample.Person","",1,2)                   
 
Checking index integrity for class 'Sample.Person'
Begin time:  08/17/2017 21:41:25
 
Verifying data from data map 'IDKEY' is indexed correctly...
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CHANG,QUIGLEY H.",39), has differences between master map data and index map data.  Corrected
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CHANG,DAN L.",40) missing.  Corrected
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CHADWICK,OLGA E.",43) missing.  Corrected
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CANNON,BARBARA W.",81) missing.  Corrected
Data Map evaluation complete, 200 rows checked, 4 errors found, elapsed time: .004733 seconds
 
Verifying data from index map "$Person" is correct...
Index map "$Person" evaluation complete, 0 errors, elapsed time: .000691 seconds
 
Verifying data from index map NameIDX is correct...
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CEMPER,DAN L.",40), data differs for field 'Name' between data and index map.  Corrected
Index map NameIDX evaluation complete, 1 errors, elapsed time: .001331 seconds
 
Verifying data from index map SSNKey is correct...
Index map SSNKey evaluation complete, 0 errors, elapsed time: .001195 seconds
 
Verifying data from index map ZipCode is correct...
Index map ZipCode evaluation complete, 0 errors, elapsed time: .001255 seconds
 
%ValidateIndices is complete, total elapsed time: .012282 seconds
 
SAMPLES>

This looks good so far.

0
Robert Cemper · Aug 17, 2017

I did a short test fiddling arouned ^Samples.PersonI

SAMPLES>Do $SYSTEM.OBJ.ValidateIndices("Sample.Person","",1,2)                   
 
Checking index integrity for class 'Sample.Person'
Begin time:  08/17/2017 21:41:25
 
Verifying data from data map 'IDKEY' is indexed correctly...
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CHANG,QUIGLEY H.",39), has differences between master map data and index map data.  Corrected
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CHANG,DAN L.",40) missing.  Corrected
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CHADWICK,OLGA E.",43) missing.  Corrected
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CANNON,BARBARA W.",81) missing.  Corrected
Data Map evaluation complete, 200 rows checked, 4 errors found, elapsed time: .004733 seconds
 
Verifying data from index map "$Person" is correct...
Index map "$Person" evaluation complete, 0 errors, elapsed time: .000691 seconds
 
Verifying data from index map NameIDX is correct...
Index 'NameIDX', entry ^Sample.PersonI("NameIDX"," CEMPER,DAN L.",40), data differs for field 'Name' between data and index map.  Corrected
Index map NameIDX evaluation complete, 1 errors, elapsed time: .001331 seconds
 
Verifying data from index map SSNKey is correct...
Index map SSNKey evaluation complete, 0 errors, elapsed time: .001195 seconds
 
Verifying data from index map ZipCode is correct...
Index map ZipCode evaluation complete, 0 errors, elapsed time: .001255 seconds
 
%ValidateIndices is complete, total elapsed time: .012282 seconds
 
SAMPLES>

This looks good so far.

0
Robert Cemper  Aug 24, 2017 to Robert Cemper

by lack of responses I converted it from a question to an article + comment

0
Udo Leimberger · Nov 14, 2017

Perhaps we can do a Tipps and Tricks section here in the Community for those posts or at least tag such articles special. 

0
Udo Leimberger  Nov 14, 2017 to Evgeny Shvarov

Thank you. I didn't know this since now.

0
Robert Cemper  Nov 14, 2017 to Udo Leimberger

Udo,

will we meet in Frankfurt at the Symposium  next week ?

0