protected virtual SrndQuery GetFieldsQuery( SrndQuery q, IList <string> fieldNames) { /* FIXME: check acceptable subquery: at least one subquery should not be * a fields query. */ return(new FieldsQuery(q, fieldNames, fieldOperator)); }
public void OptionalWeights(SrndQuery q) { Token weight = null; while (true) { switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk) { case RegexpToken.CARAT: ; break; default: jj_la1[9] = jj_gen; goto label_8; } Jj_consume_token(RegexpToken.CARAT); weight = Jj_consume_token(RegexpToken.NUMBER); float f; try { // LUCENENET TODO: Test parsing float in various cultures (.NET) f = float.Parse(weight.Image); } catch (Exception floatExc) { { if (true) { throw new ParseException(boostErrorMessage + weight.Image + " (" + floatExc + ")"); } } } if (f <= 0.0) { { if (true) { throw new ParseException(boostErrorMessage + weight.Image); } } } q.Weight = (f * q.Weight); /* left associative, fwiw */ } label_8 :; }
public void OptionalWeights(SrndQuery q) { Token weight; // LUCENENET: IDE0059: Remove unnecessary value assignment while (true) { switch ((jj_ntk == -1) ? Jj_ntk() : jj_ntk) { case RegexpToken.CARAT: ; break; default: jj_la1[9] = jj_gen; goto label_8; } Jj_consume_token(RegexpToken.CARAT); weight = Jj_consume_token(RegexpToken.NUMBER); float f; try { // LUCENENET TODO: Test parsing float in various cultures (.NET) f = float.Parse(weight.Image); } catch (Exception floatExc) // LUCENENET: No need to call the IsException() extension method here because we are dealing only with a .NET platform method { { if (true) { throw new ParseException(boostErrorMessage + weight.Image + " (" + floatExc + ")", floatExc); } } } if (f <= 0.0) { { if (true) { throw new ParseException(boostErrorMessage + weight.Image); } } } q.Weight = (f * q.Weight); /* left associative, fwiw */ } label_8 :; }