index-time boosting using DIH
hello all, can i use the technique described on the wiki at: http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts if i am populating my core using a DIH? looking at the posts on this subject and the wiki docs - leads me to believe that you can only use this when you are using the xml interface for importing data? thank you -- View this message in context: http://lucene.472066.n3.nabble.com/index-time-boosting-using-DIH-tp3985508.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: index-time boosting using DIH
See http://wiki.apache.org/solr/DataImportHandler#Special_Commands and the $docBoost pseudo-field name. James Dyer E-Commerce Systems Ingram Content Group (615) 213-4311 -Original Message- From: geeky2 [mailto:gee...@hotmail.com] Sent: Tuesday, May 22, 2012 2:12 PM To: solr-user@lucene.apache.org Subject: index-time boosting using DIH hello all, can i use the technique described on the wiki at: http://wiki.apache.org/solr/SolrRelevancyFAQ#index-time_boosts if i am populating my core using a DIH? looking at the posts on this subject and the wiki docs - leads me to believe that you can only use this when you are using the xml interface for importing data? thank you -- View this message in context: http://lucene.472066.n3.nabble.com/index-time-boosting-using-DIH-tp3985508.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: index-time boosting using DIH
thanks for the reply, so to use the $docBoost pseudo-field name, would you do something like below - and would this technique likely increase my total index time? dataConfig dataSource .../ document name=mydoc entity name=myentity transformer=script:BoostDoc query=select ... field column=SOME_COLUMN name=someField / ... -- View this message in context: http://lucene.472066.n3.nabble.com/index-time-boosting-using-DIH-tp3985508p3985527.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: index-time boosting using DIH
You need to add the $docBoost pseudo-field to the document somehow. A transformer is one way to do it. You could just add it to a SELECT statement, which is especially convienent if the boost value somehow is derrived from the data: SELECT case when SELL_MORE_FLAG='Y' then 999 ELSE null END as '$docBoost', ...other fields... from some_table, etc Either way I wouldn't expect it to make the indexing be noticably slower. James Dyer E-Commerce Systems Ingram Content Group (615) 213-4311 -Original Message- From: geeky2 [mailto:gee...@hotmail.com] Sent: Tuesday, May 22, 2012 3:06 PM To: solr-user@lucene.apache.org Subject: RE: index-time boosting using DIH thanks for the reply, so to use the $docBoost pseudo-field name, would you do something like below - and would this technique likely increase my total index time? dataConfig dataSource .../ document name=mydoc entity name=myentity transformer=script:BoostDoc query=select ... field column=SOME_COLUMN name=someField / ... -- View this message in context: http://lucene.472066.n3.nabble.com/index-time-boosting-using-DIH-tp3985508p3985527.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: index-time boosting using DIH
thank you james for the feedback - i appreciate it. ultimately - i was trying to decide if i was missing the boat by ONLY using query time boosting, and i should really be using index time boosting. but after your reply, reading the solr book, and looking at the lucene dox - it looks like index-time boosting is not what i need. i can probably do better by using query-time boosting and the proper sort params. thanks again -- View this message in context: http://lucene.472066.n3.nabble.com/index-time-boosting-using-DIH-tp3985508p3985539.html Sent from the Solr - User mailing list archive at Nabble.com.
RE: Index time boosting with DIH
Thanks for the answer. I want to share the configuration that worked for me (see the follow up question at the end): (Boosting a document on the basis of a field value at index time.) It took me some time to figure out, that for the row.get to work, I had to use the column name (the one in the select list) whereas for a put the fieldname (or pseudo fieldname) is working. dataConfig dataSource .../ script![CDATA[ function BoostDoc(row) { if(row.get('SOME_COLUMN') == 'someValue') { row.put('$docBoost', 20); } return row; } ]]/script document name=mydoc entity name=myentity transformer=script:BoostDoc query=select ... field column=SOME_COLUMN name=someField / ... A follow-up question: This is only working for non-wildcard queries for me (StandardRequestHandler as well as edismax) For wildcard-queries a constant score is returned. Is there any way to get this setting working for wildcard queries as well? -Original Message- From: Shalin Shekhar Mangar [mailto:shalinman...@gmail.com] Sent: Donnerstag, 28. Juli 2011 12:37 To: solr-user@lucene.apache.org Subject: Re: Index time boosting with DIH On Thu, Jul 28, 2011 at 3:56 PM, Bürkle, David david.buer...@irix.chwrote: Can someone point me to an example for using index time boosting with the DataImportHandler. You can use the special flag variable $docBoost to add a index time boost. http://wiki.apache.org/solr/DataImportHandler#Special_Commands -- Regards, Shalin Shekhar Mangar.
Index time boosting with DIH
Can someone point me to an example for using index time boosting with the DataImportHandler.
Re: Index time boosting with DIH
On Thu, Jul 28, 2011 at 3:56 PM, Bürkle, David david.buer...@irix.chwrote: Can someone point me to an example for using index time boosting with the DataImportHandler. You can use the special flag variable $docBoost to add a index time boost. http://wiki.apache.org/solr/DataImportHandler#Special_Commands -- Regards, Shalin Shekhar Mangar.