1.) I’m not aware of a method that meets your need. Perhaps it would make sense to refactor the existing Set<String> getFieldList to wrap around a separate method that returns a Set<Field>, but this does not look like it would be an entirely straightforward task, so it may be impractical. Maybe Bob has a better idea.
2.) BeanShell definitely causes a performance hit, but I don’t think it’s terribly significant. It certainly doesn’t hurt to prototype in BeanShell. If the performance is good enough, then you’re done; if you have problems, it’s not difficult to adapt it to pure Java and compile it in.
3.) A method that takes a fieldspec and returns an array of title sort keys sounds pretty generalized to me. My only question is whether this could be combined with the existing getSortableTitle in some way to avoid redundant logic (i.e. have one work as a special case of the other).
- Demian
--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/solrmarc-tech/-/_qSRKdgdsvoJ.
To post to this group, send email to solrma...@googlegroups.com.
To unsubscribe from this group, send email to solrmarc-tec...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/solrmarc-tech?hl=en.
Hopefully Bob Haschart will chime in on this – he’s the main architect of SolrMarc, and his opinion is much more informed than mine! However, I think this does sound like a sensible solution. As you say, it would be great if you could take the functional programming approach and actually pass in the processing routine you want to use. That’s not so easy in Java, but maybe the next best thing would to be define an interface (i.e. MarcFilterInterface) and pass in an object that instantiates the interface. Then you just use the object to process the matches. Obviously, the big limitation here is that you can’t pass arbitrary objects in from the SolrMarc configuration files… but at least this would allow more flexibility under the hood, and you could create wrapper functions as needed to be called from the configs.
- Demian
To view this discussion on the web visit https://groups.google.com/d/msg/solrmarc-tech/-/WQ2NAUyfSOIJ.