@Override public String getFieldParam(String field, String param, String def) { return params.getFieldParam(field, param, def); }
@Override public String getFieldParam(String field, String param, String def) { return params.getFieldParam(field, param, def); } }
/** Returns the float value of the field param, or the value for param, or def if neither is set. */ public double getFieldDouble(String field, String param, double def) { String val = getFieldParam(field, param); try { return val==null ? def : Double.parseDouble(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the float value of the field param, or the value for param, or def if neither is set. */ public double getFieldDouble(String field, String param, double def) { String val = getFieldParam(field, param); try { return val==null ? def : Double.parseDouble(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the int value of the field param, or the value for param, or def if neither is set. */ public int getFieldInt(String field, String param, int def) { String val = getFieldParam(field, param); try { return val==null ? def : Integer.parseInt(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the float value of the field param, or the value for param, or def if neither is set. */ public float getFieldFloat(String field, String param, float def) { String val = getFieldParam(field, param); try { return val==null ? def : Float.parseFloat(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** * Returns the Boolean value of the field param, * or the value for param, or null if neither is set. * Use this method only when you want to be explicit * about absence of a value (<code>null</code>) vs the default value <code>false</code>. * @see #getFieldBool(String, String, boolean) * @see #getPrimitiveFieldBool(String, String) **/ public Boolean getFieldBool(String field, String param) { String val = getFieldParam(field, param); return val==null ? null : StrUtils.parseBool(val); }
/** Returns the boolean value of the field param, or the value for param, or def if neither is set. */ public boolean getFieldBool(String field, String param, boolean def) { String val = getFieldParam(field, param); return val==null ? def : parseBool(val); }
/** Returns the boolean value of the field param, or the value for param, or def if neither is set. */ public boolean getFieldBool(String field, String param, boolean def) { String val = getFieldParam(field, param); return val==null ? def : StrUtils.parseBool(val); }
/** * Returns the boolean value of the field param, * or the value for param, or def if neither is set. * * */ public boolean getFieldBool(String field, String param, boolean def) { String val = getFieldParam(field, param); return val==null ? def : StrUtils.parseBool(val); }
/** Returns the Boolean value of the field param, or the value for param, or null if neither is set. */ public Boolean getFieldBool(String field, String param) { String val = getFieldParam(field, param); return val==null ? null : parseBool(val); }
/** Returns the float value of the field param. */ public Float getFieldFloat(String field, String param) { String val = getFieldParam(field, param); try { return val==null ? null : Float.valueOf(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the float value of the field param, or the value for param, or def if neither is set. */ public float getFieldFloat(String field, String param, float def) { String val = getFieldParam(field, param); try { return val==null ? def : Float.parseFloat(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
public Formatter getFormatter(String fieldName, SolrParams params ) { numRequests++; if( defaults != null ) { params = new DefaultSolrParams( params, defaults ); } return new SimpleHTMLFormatter( params.getFieldParam(fieldName, HighlightParams.SIMPLE_PRE, "<em>" ), params.getFieldParam(fieldName, HighlightParams.SIMPLE_POST, "</em>")); }
/** Returns the Boolean value of the field param, or the value for param, or null if neither is set. */ public Boolean getFieldBool(String field, String param) { String val = getFieldParam(field, param); return val==null ? null : StrUtils.parseBool(val); }
/** Returns the int value of the field param, or the value for param, or def if neither is set. */ public Integer getFieldInt(String field, String param) { String val = getFieldParam(field, param); try { return val==null ? null : Integer.valueOf(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the int value of the field param, or the value for param, or def if neither is set. */ public int getFieldInt(String field, String param, int def) { String val = getFieldParam(field, param); try { return val==null ? def : Integer.parseInt(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the float value of the field param. */ public Float getFieldFloat(String field, String param) { String val = getFieldParam(field, param); try { return val==null ? null : Float.valueOf(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the int value of the field param, or the value for param, or def if neither is set. */ public int getFieldInt(String field, String param, int def) { String val = getFieldParam(field, param); try { return val==null ? def : Integer.parseInt(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }
/** Returns the float value of the field param, or the value for param, or def if neither is set. */ public float getFieldFloat(String field, String param, float def) { String val = getFieldParam(field, param); try { return val==null ? def : Float.parseFloat(val); } catch( Exception ex ) { throw new SolrException( SolrException.ErrorCode.BAD_REQUEST, ex.getMessage(), ex ); } }