Re: Boosting by date when only some records have one

2008-12-17 Thread Robert Krüger
Hi Lance, thanks for your feedback! The problem with your suggestion is that we do not want to exclude the fields without a date but boost them differently, which Chris has provided a solution for (see other posts in this thread). Cheers, Robert Norskog, Lance wrote: > This query:field:

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