Basically I have a solr index where, at times, some of the results from a query will only be limited to a set of users based on their clients IP address. I have been thinking about accomplishing this in either two ways.
1) Post-processing the results for IP validity against an external data source and dropping out those results which are not valid. That could leave me with a portioned result list that would need another query to fill back in. Say I want 10 results, I end up dropping 2 of them, I need to fill back in those 2 by performing another query.
2) Making the IP permission check part of the query. Basically appending an AND in the query on a field that stores the permissible IP addresses. The index field would be set to allow all IPs to access the result by default, but at times can contain the allowable IP addresses or maybe even ranges somehow.
Are there some other ways to accomplish this I haven't considered? Right now #2 sounds seems more desirable to me.
Thanks in advance for your thoughts!
Digital Library Architect
Rutgers University Libraries
Scholarly Communication Center
Room 409D, Alexander Library
169 College Avenue, New Brunswick, NJ 08901