This page contains tips for troubleshooting common MARC import problems.
Sometimes when you run an import, the number of records in your index will not match the number of records in your MARC file. This can happen for a few possible reasons:
Here is a process for identifying whether you have one of the first two problems:
First, run the import process and redirect it to a file:
$VUFIND_HOME/import-marc.sh /path/to/your/marc-file.mrc > /tmp/import.log
Next, filter DEBUG messages from the log and see if there are any ERROR or WARNING messages indicating corrupt records:
cat /tmp/import.log | grep -v DEBUG
If this does not reveal the cause of your problem, you can look for duplicate IDs by sorting the output and comparing deduplicated results against non-deduplicated results. For example:
sort < /tmp/import.log > /tmp/import-sorted.log sort -u < /tmp/import.log > /tmp/import-sorted-unique.log diff /tmp/import-sorted.log /tmp/import-sorted-unique.log
If you have duplicate records, the diff command will show the duplicate DEBUG lines highlighting the IDs of the duplicates.
IMPORTANT: this process will only work if your unique IDs are in the 001 field, because the SolrMarc debug output only includes 001 values. If your identifiers are stored somewhere else, you will need a different method of detecting duplicates.