Package org.apache.lucene.xmlparser

Examples of org.apache.lucene.xmlparser.ParserException


        q = parser.parse(text);       
      }
      q.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
      return q;
    } catch (ParseException e1) {
      throw new ParserException(e1.getMessage());
    }
  }
View Full Code Here


      {
        df.setKeepMode(DuplicateFilter.KM_USE_LAST_OCCURRENCE);
      }
      else
      {
        throw new ParserException("Illegal keepMode attribute in DuplicateFilter:"+keepMode);
      }
    String processingMode=DOMUtils.getAttribute(e,"processingMode","full");
    if(processingMode.equalsIgnoreCase("full"))
    {
      df.setProcessingMode(DuplicateFilter.PM_FULL_VALIDATION);
    }
    else
      if(processingMode.equalsIgnoreCase("fast"))
      {
        df.setProcessingMode(DuplicateFilter.PM_FAST_INVALIDATION);
      }
      else
      {
        throw new ParserException("Illegal processingMode attribute in DuplicateFilter:"+processingMode);
      }
         
    return df;
  }
View Full Code Here

      soq.setBoost(DOMUtils.getAttribute(e,"boost",1.0f));
      return soq;
    }
    catch(IOException ioe)
    {
        throw new ParserException("IOException parsing value:"+value);
    }
  }
View Full Code Here

  public SpanQuery getSpanQuery(Element e) throws ParserException
  {
    SpanQueryBuilder builder= builders.get(e.getNodeName());
    if(builder==null)
    {
      throw new ParserException("No SpanQueryObjectBuilder defined for node "+e.getNodeName());
    }
    return builder.getSpanQuery(e);
  }
View Full Code Here

      } else if (type.equalsIgnoreCase("float")) {
        filter = NumericRangeFilter.newFloatRange(field, precisionStep, Float
            .valueOf(lowerTerm), Float.valueOf(upperTerm), lowerInclusive,
            upperInclusive);
      } else {
        throw new ParserException(
            "type attribute must be one of: [long, int, double, float]");
      }
      return filter;
    } catch (NumberFormatException nfe) {
      if (strictMode) {
        throw new ParserException(
            "Could not parse lowerTerm or upperTerm into a number", nfe);
      }
      return NO_MATCH_FILTER;
    }
  }
View Full Code Here

      } else if (type.equalsIgnoreCase("float")) {
        filter = NumericRangeQuery.newFloatRange(field, precisionStep, Float
            .valueOf(lowerTerm), Float.valueOf(upperTerm), lowerInclusive,
            upperInclusive);
      } else {
        throw new ParserException(
            "type attribute must be one of: [long, int, double, float]");
      }
      return filter;
    } catch (NumberFormatException nfe) {
      throw new ParserException(
          "Could not parse lowerTerm or upperTerm into a number", nfe);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.xmlparser.ParserException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.