On 11/03/2016 17:36, Jitka wrote:
Hello. Our company uses Solr-4.10 in a distributed environment. We are considering how best to customize results based on user preferences, information about which is obtained from an external service. At present the preferences can be expressed as filters, but eventually we might want to introduce boosts as well.
You might want to consider XJoin as well: here's a blog post we wrote on filtering using price discount data from an external source http://www.flax.co.uk/blog/2016/01/25/xjoin-solr-part-1-filtering-using-price-discount-data/
Cheers Charlie
The options we are considering are (1) a value source whose FunctionValues() function would make use of data from the external service, and (2) a separate core containing docs whose primary key is user_id and whose other fields represent data from the service. We would create filter queries based on joins with this core. Any suggestions would be most welcome. Are we missing an obvious alternative? I assume that we would want to cache data from the service (in option (1)) or the join (in option (2)), and possibly also the values of the value source's FunctionValues() function in option (1). Would it make sense to use SolrCaches for this purpose and register them in solrconfig.xml? If so, or if not, how would we ensure that these caches could be updated whenever the service is updated? How about ensuring that the built-in caches don't prevent Solr from even looking at the custom caches? We could use the 'cache=false' option for the filterCache; would we have to worry about other ones? I see how how a join on a second core could support a filter, but how could we use a second core to support boosts? I suppose that if worse came to worst we could forgo the join and simply make a call to the second core on localhost to retrieve data to be used in a value source. Is that a practical solution? Thanks in advance for your time and advice. Jitka -- View this message in context: http://lucene.472066.n3.nabble.com/using-data-from-external-service-in-Solr-value-source-or-auxiliary-core-tp4263334.html Sent from the Solr - User mailing list archive at Nabble.com.
-- Charlie Hull Flax - Open Source Enterprise Search tel/fax: +44 (0)8700 118334 mobile: +44 (0)7767 825828 web: www.flax.co.uk