mattgodbolt / zindex

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

Support multiple indexes #1

Closed mattgodbolt closed 8 years ago

mattgodbolt commented 9 years ago

For some data it's nice to be able to have multiple indices. For example, apache log files might want an index on the time, and one on the page name.

The current zindex command-line parser (TCLAP) isn't conducive to supporting all the per-index configurations that might be needed, so either a whole new syntax may be required, or else some other way of supplying an index configuration.

Maybe YAML, or JSON? If we need JSON anyway, that might be an option.

Maybe something like:

{
 "default": { "regex": "'\\[([^]]+)\\]'", "unique": false, "numeric": false },
 "page": { "regex": "GET|POST ([^ ]+)"
}

(uniqueness and numericness defaulting to zero, shown above for exposition only.

mattgodbolt commented 8 years ago

Thanks to @andreweskeclarke this is now done!