Will all the total lines and slocs be aggregated at repository root level ?
That is certainly feasible in the future. Right now, only files have document data in the Lucene index. To store aggregated num-lines and LOC, it will be necessary to store Lucene data for directories — but without conflicting with the existing queries that all assume only file-level data.
One straight-forward idea would be to add Lucene "documents" for directories with wholly-separate fields so that these new documents never appear in current queries. Of course it would also be necessary to write an aggregator that runs at the appropriate stages.
That is certainly feasible in the future. Right now, only files have document data in the Lucene index. To store aggregated num-lines and LOC, it will be necessary to store Lucene data for directories — but without conflicting with the existing queries that all assume only file-level data.
One straight-forward idea would be to add Lucene "documents" for directories with wholly-separate fields so that these new documents never appear in current queries. Of course it would also be necessary to write an aggregator that runs at the appropriate stages.
Originally posted by @idodeclare in https://github.com/oracle/opengrok/pull/1987#issuecomment-360827887