mattgodbolt / zindex

Create an index on a compressed text file
BSD 2-Clause "Simplified" License
620 stars 37 forks source link

error indexing three concatenated files #42

Closed mattgodbolt closed 1 year ago

mattgodbolt commented 1 year ago
    Hi Matt,

Another issue that is probably related:

echo "line 1" | gzip > concat.gz echo "line 2" | gzip >> concat.gz echo "line 1" | gzip >> concat.gz zindex concat.gz --regex 'line ([0-9]+)' --numeric --unique

ERROR: Failed to index line 3: 'line 1' - Error handling index match '1' - constraint failed Again, this only happens for concatenated gzip files.

Thanks! René

Op 4 sep. 2017, om 16:54 heeft Matt Godbolt notifications@github.com het volgende geschreven:

Thanks for the report! I'll take a look.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mattgodbolt/zindex/issues/30#issuecomment-326981555, or mute the thread https://github.com/notifications/unsubscribe-auth/AAca2RqglXsvcrB3BLiC9r8lmnrSy_3Hks5sfA8_gaJpZM4PL12m.

Originally posted by @renevoorburg in https://github.com/mattgodbolt/zindex/issues/30#issuecomment-327017800

mattgodbolt commented 1 year ago

Oh @renevoorburg - you had the --unique constraint and your third concatenation has line 1 again!

Either drop the --unique or echo "line 3" instead! This is working as intended (amazingly!)