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?

Robert


Chris Hostetter wrote:
> : 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 get's simpler if you can concretely know that hasDateField will 
> always have a value of true or false...
> 
>  bq = ( hasDateField:false^1 ( +hasDateField:true _val_:somefunc(dateField) )
> 
> 
> 
> 
> -Hoss
> 

Reply via email to