RE: Index time boosting with DIH

2011-07-29 Thread Bürkle , David
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

2011-07-28 Thread Bürkle , David
Can someone point me to an example for using index time boosting with the 
DataImportHandler.