This is actually two or three questions. They may be the wrong questions, so if there’s reasons for not doing it this way please share!
1. How to range search by entering a minimum and maximum value?
A user wants to filter the query to only include values that fit within the entered minimum and maximum value.
2. How to range search on a metadata range value?
That is, to find any documents that that have a range that intersects with the query range.
Eg: I search for “2-5”, and the following results are returned:
For question one the answer is to have an input field for a le param and ge param.
But for question two it’s not possible. I think it might be possible to write a groovy script to process the entire data set and produce occurrences for each interval (like event mode), then search with le and ge on that.
But thankfully the client is happy to not have this functionality after all
For question two, could you instead write a script that would give another metadata value containing a list or sequence of multiple values, equal to the integers between and including the lower and upper bounds of the range.
e.g. for the results you mentioned, they would have a corresponding field with the following values:
2-2 = 2
1-2 = 1|2
3-6 = 3|4|5|6
3-4 = 3|4
And then you just need to use numeric range facets as @plevan mentioned.
My knowledge of groovy isn’t that great, so I don’t know the actual code to produce those values, but I’m sure it’s possible with simple loops.