I just fixed the Browse module so it works with the new JSON return values from Solr. In doing this, I noticed that the Alphabetical browse option seems to be broken. I'm not sure if this is a side effect of my fix or a long-standing problem. Two problems:
1.) I assume that when you click Alphabetical, it's supposed to expand out to the letters A through Z with counts of facets starting with those letters. Instead, it's just giving a brief list of facets starting near the beginning of the alphabet, and clicking on these facets tends not to work. Definitely not the intended behavior!
2.) If I fake out the system to return a hard-coded list of the letters A through Z in place, things work a bit better. However, I find that the results you get from clicking on a letter don't always all start with that letter. I think I understand why this is the case -- I think our search essentially says "give me all the facets drawn from records that have facets starting with A." So if you have a record with "Antelope" and "Zebra" facets, you'll see "Zebra" because you matched on "Antelope."
I can think of some brute-force solutions to these problems, but I'm hoping someone with more Solr experience can offer more elegant solutions.
Is there a way to solve #1 with a query that will return initial letters of facets along with counts without having to create new index fields? Is it better to brute force 26 Solr queries in a row to achieve that effect? Is it safest to ignore the counts and just hard-code the letters?
Is there a way to solve #2 through the query string, or should I do post-processing on the results to ensure that they match the expected starting letter?
Get latest updates about Open Source Projects, Conferences and News.