1) That govdocs syntax didn’t work. Caused an “Array provided to Escape helper, but flags do not allow recursion” error. Anything with square brackets seems to piss it off.
2) Truthfully, I was trying to piggyback on the date range just to get a proof of concept. What I’m actually doing is creating a range search for Accelerated Reader and Reading Counts levels which are floating numbers so it was going to require some code departure anyway. Over the river and through the code I go.
From: Demian Katz [mailto:email@example.com]
Sent: Tuesday, April 30, 2013 9:47 AM
To: Chanel Wheeler; vufind-tech (firstname.lastname@example.org)
Subject: RE: couple of facet questions
govdocs:[* TO *]
2.) The [SpecialFacets] stuff is all hard-coded, so you’ll need to build your own. If you follow the configuration keys from the configuration file through the code you should find all the pieces (but let me know if anything is unclear). It may be possible to generalize this to make it easier to add more – if you have any ideas (or want to discuss strategies), let me know; might be something worth including in a future release.
I created a Government Documents checkbox facet. It indexes 008 byte 28. The intention is that when you check the box only the search results that have a value at 008 will appear (there’s about 10 possible values). I’m not sure how to structure the entry in facets.ini to get the desired results. I tried:
govdocs:* = "Government Documents"
but that just resulted in an empty result set. (If I replace the * with an “f” it works but I want all govdocs, not just the federal ones.) Various other regexes didn’t work either (I’m guessing as to what may or may not be accepted). Is the only way to solve this to reindex, evaluate the field, and set the index to something like 1 or 0 so that the facets.ini entry will look like:
govdocs:1 = "Government Documents" ?
Second facet question … I added a couple of new ranges under [SpecialFacets] (fields already indexed but perhaps not correctly). I was expecting some new facet date ranges to appear (cleared cache) but none did. Is it that I did something wrong in the indexing or is it that I have to implement something more for these new ranges to appear? (Indices definitely exist in records; didn’t get any new values in $dateFacets or $sideFacetSet in SideFacets.phtml.)
Thanks for any pointers,
Library Network Programmer/Analyst
Yavapai Library Network
1120 Commerce Dr.
Prescott, AZ 86305
Phone: (928) 442-5741
Open a help desk ticket