Re: Boosting by date when only some records have one

2008-12-17 Thread Robert Krüger
ailto:krue...@signal7.de] > Sent: Saturday, December 13, 2008 4:22 AM > To: solr-user@lucene.apache.org > Subject: Boosting by date when only some records have one > > > Hi, > > I'm looking for a way to boost queries by date but not all documents have a > date ass

Re: Boosting by date when only some records have one

2008-12-16 Thread Robert Krüger
Chris Hostetter wrote: > : thanks a lot! Looks like what I need except that I cannot use dismax > : because I need to be able to do prefix queries. I'm new to Solr, so I > > there's nothing dismax related in that syntax, i just suggested using it > in a "bq" param becuase i assumed that's what yo

Re: Boosting by date when only some records have one

2008-12-16 Thread Chris Hostetter
: thanks a lot! Looks like what I need except that I cannot use dismax : because I need to be able to do prefix queries. I'm new to Solr, so I there's nothing dismax related in that syntax, i just suggested using it in a "bq" param becuase i assumed that's what you were using. q = +pre:fix* (ha

Re: Boosting by date when only some records have one

2008-12-16 Thread Robert Krüger
Hi, thanks a lot! Looks like what I need except that I cannot use dismax because I need to be able to do prefix queries. I'm new to Solr, so I don't know if there's a way to formulate this in a standard query. If not, I could extend DismaxRequestHandler so it doesn't escape the "*"s, right? Robe

Re: Boosting by date when only some records have one

2008-12-16 Thread Chris Hostetter
: if(document.hasDateField == 1){ : boost = somefunction(document.dateField); : } else{ : boost = 1; : } bq = ( ( +hasDateField:true _val_:somefunc(dateField) ) ( -hasDateField:true *:*^1 ) ) That covers the possiblility that hasDateField is not set for some docs. The query

Boosting by date when only some records have one

2008-12-13 Thread Robert Krüger
Hi, I'm looking for a way to boost queries by date but not all documents have a date associated with them. My goal is to have something like a default boost for documents (e.g. 1.0) with a function for documents with dates that distribute the boosts between 1.0 - x to 1.0 + x based on a valid dat