From: Demian K. <dem...@vi...> - 2012-09-13 13:04:40
|
There are two different ways you can address this, and both require similar configuration: Option 1.) Don't bother doing any calculation at index time. Configure your web/conf/searchspecs.yaml file to use the DisMax bq setting to apply appropriate boosts (i.e. [bq, "source_id:abc^100 OR source_id:def^50 OR source_id:ghi^25"]). If you have a relatively small number of source IDs, this is probably easier... and it allows you to tweak the boost values without having to reindex all of your data. Option 2.) Create a numeric boost field (or use a dynamic field to avoid having to modify the Solr schema) and populate this using a custom indexing function based on the values in source_id. Configure web/conf/searchspecs.yaml to use the DisMax bf setting to adjust relevancy using a formula which includes your new field. This works best if you need to use complex calculations to determine your boost values and don't mind reindexing every time something changes. For more details on the DisMax params, see: http://wiki.apache.org/solr/DisMaxQParserPlugin#bq_.28Boost_Query.29 Details on the searchspecs.yaml syntax can be found in comments at the top of the file. If you have questions or problems, feel free to post here again -- sometimes the YAML syntax can be a bit annoying to work with. - Demian > -----Original Message----- > From: Leander Seige [mailto:se...@ub...] > Sent: Thursday, September 13, 2012 2:48 AM > To: vuf...@li... > Subject: [VuFind-Tech] boosting records at index-time > > Hello everyone, > > I'm looking for a way to define the index-time boosting factor [1] via > vufind's solrmarc import routine but couldn't find it in the first place. > > The background: we're collecting data from multiple sources into one > unified vufind/solr index and we distinguish these records by using an > additional field "source_id" in our solr schema. Now i'd like to > slightly boost records just because they come from a certain source and > I thought it would be the right way to use solr's boost-attribute to do > per-record boosting at index-time. > > Cheers, > Leander > > > [1] http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts > > > > -- > Leander Seige > Universitaetsbibliothek Leipzig > Leiter IT-Abteilung > Projektkoordinator finc > Beethovenstraße 6 > 04107 Leipzig > > fon: +49 (0)341 9730612 > mail: se...@ub... > > http://www.ub.uni-leipzig.de > http://finc.info > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Vufind-tech mailing list > Vuf...@li... > https://lists.sourceforge.net/lists/listinfo/vufind-tech |