Lucene 3.4 now supports faceted search. When indexing, you specify something additional, and during the search, you search by query and by group.
for the next 3 documents you index with these groups
doc1: monday, 1pm, 3min
doc2: monday, 1pm, 4min
doc3: monday, 2pm, 3min
you can search only for the first parameter: Monday and get the value: 3, or you can expand and search for Monday / 1pm and get the value: 2 or set the search depth to 3 and get
monday :3
monday/1pm :2
monday/1pm/3min :1
monday/1pm/4min :1
monday/2pm :1
monday/2pm/3min :1
here is the original example :
But most of all read faceted search