/** {@inheritDoc} */ public void new_query(Manager m, SearchRequest srq, ResultSet rs) { site = srq.getControl("site").toLowerCase(); }
/** {@inheritDoc} */ public void new_query(Manager m, SearchRequest srq, ResultSet rs) { site = srq.getControl("site").toLowerCase(); }
default boolean hasControl(String Name) { return getControl(Name).length() > 0; }
protected boolean checkControl(String control_name, SearchRequest srq) { String controlValue = srq.getControl(control_name); if (controlValue.length() == 0) return false; if (controlValue.equals("0") || controlValue.toLowerCase().equals("off") || controlValue.toLowerCase().equals("false")) return false; return true; }
protected boolean checkControl(String control_name, SearchRequest srq) { String controlValue = srq.getControl(control_name); if (controlValue.length() == 0) return false; if (controlValue.equals("0") || controlValue.toLowerCase().equals("off") || controlValue.toLowerCase().equals("false")) return false; return true; }
/** Returns the value of the control, or Default if not set. * @return the value. */ default String getControl(String Name, String Default) { return hasControl(Name) ? getControl(Name) : Default; }
@Override public void process(Manager manager, SearchRequest q) { initialise(q); String modelName = q.getControl(CONTROL_MODEL); if (modelName == null || modelName.length() == 0) modelName = DEFAULT_DEPENDENCE_WEIGHTING_MODEL; String paramValue = q.getControl(CONTROL_MODEL_PARAM); param = paramValue != null && paramValue.length() > 0 ? Double.parseDouble(paramValue) : null; this.process(((Request)q).getMatchingQueryTerms(), modelName); }
@Override public void process(Manager manager, SearchRequest q) { initialise(q); String modelName = q.getControl(CONTROL_MODEL); if (modelName == null || modelName.length() == 0) modelName = DEFAULT_DEPENDENCE_WEIGHTING_MODEL; String paramValue = q.getControl(CONTROL_MODEL_PARAM); param = paramValue != null && paramValue.length() > 0 ? Double.parseDouble(paramValue) : null; this.process(((Request)q).getMatchingQueryTerms(), modelName); }
/** * Creates a HashSet of scopes that can are allowed to * be in the document number prefix. * @param m Manager the manager used for processing the request. * @param srq SearchRequest the search request to process. * @param rs ResultSet the result set for the search request. */ public void new_query(Manager m, SearchRequest srq, ResultSet rs) { AllowedScopes = new HashSet<String>(); rsHasDocno = rs.hasMetaItems("docno"); String scope = srq.getControl("scope"); if (scope.equals("")) scope = srq.getControl("scopes"); if (scope != null && scope.length() > 0) { String[] scopes = scope.split(","); for(int scopeno = 0; scopeno < scopes.length; scopeno++) { AllowedScopes.add(scopes[scopeno].toLowerCase()); } useScopes = true; } } /**
/** * Creates a HashSet of scopes that can are allowed to * be in the document number prefix. * @param m Manager the manager used for processing the request. * @param srq SearchRequest the search request to process. * @param rs ResultSet the result set for the search request. */ public void new_query(Manager m, SearchRequest srq, ResultSet rs) { AllowedScopes = new HashSet<String>(); rsHasDocno = rs.hasMetaItems("docno"); String scope = srq.getControl("scope"); if (scope.equals("")) scope = srq.getControl("scopes"); if (scope != null && scope.length() > 0) { String[] scopes = scope.split(","); for(int scopeno = 0; scopeno < scopes.length; scopeno++) { AllowedScopes.add(scopes[scopeno].toLowerCase()); } useScopes = true; } } /**
info.append(wmodel.getInfo()); info.append(srq.getControl("runname"));
info.append(wmodel.getInfo()); info.append(srq.getControl("runname"));
method = ApplicationSetup.getProperty("trec.runtag", srq.getControl("wmodel", srq.getControl("runtag", "unknown"))); if (srq.hasControl("qe")) method = method +
method = ApplicationSetup.getProperty("trec.runtag", srq.getControl("wmodel", srq.getControl("runtag", "unknown"))); if (srq.hasControl("qe")) method = method +
for(String summarykey : ArrayUtils.parseDelimitedString(q.getControl("summaries"),CONTROL_VALUE_DELIMS)) for(String emphKey : ArrayUtils.parseDelimitedString(q.getControl("emphasis"),CONTROL_VALUE_DELIMS)) for(String earlyKey : ArrayUtils.parseDelimitedString(q.getControl("earlyDecorate"),CONTROL_VALUE_DELIMS)) for(String escapeKey : ArrayUtils.parseDelimitedString(q.getControl("escape"),CONTROL_VALUE_DELIMS))
for(String summarykey : ArrayUtils.parseDelimitedString(q.getControl("summaries"),CONTROL_VALUE_DELIMS)) for(String emphKey : ArrayUtils.parseDelimitedString(q.getControl("emphasis"),CONTROL_VALUE_DELIMS)) for(String earlyKey : ArrayUtils.parseDelimitedString(q.getControl("earlyDecorate"),CONTROL_VALUE_DELIMS)) for(String escapeKey : ArrayUtils.parseDelimitedString(q.getControl("escape"),CONTROL_VALUE_DELIMS))
if ((c = srq.getControl("c")).length() > 0) { c_set = true; srq.setControl(CONTROL_MATCHING, mModel); if (srq.getControl("qe").equals("on")) { srq.setControl("qemodel", defaultQEModel);
if ((c = srq.getControl("c")).length() > 0) { c_set = true; srq.setControl(CONTROL_MATCHING, mModel); if (srq.getControl("qe").equals("on")) { srq.setControl("qemodel", defaultQEModel);