Package org.apache.lucene.util.automaton

Examples of org.apache.lucene.util.automaton.RegExp.toAutomaton()


    private final Automaton automaton;
   
    DumbRegexpQuery(Term term, int flags) {
      super(term.field());
      RegExp re = new RegExp(term.text(), flags);
      automaton = re.toAutomaton();
    }
   
    @Override
    protected TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException {
      return new SimpleAutomatonTermsEnum(terms.iterator(null));
View Full Code Here


    private final Automaton automaton;
   
    DumbRegexpQuery(Term term, int flags) {
      super(term.field());
      RegExp re = new RegExp(term.text(), flags);
      automaton = re.toAutomaton();
    }
   
    @Override
    protected TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException {
      return new SimpleAutomatonTermsEnum(terms.iterator(null));
View Full Code Here

        BytesRef pattern = args[1].value();
        if (pattern == null) {
            return null;
        }
        RegExp regexp = new RegExp(pattern.utf8ToString());
        ByteRunAutomaton regexpRunAutomaton = new ByteRunAutomaton(regexp.toAutomaton());
        return regexpRunAutomaton.run(source.bytes, source.offset, source.length);
    }

    @Override
    public FunctionInfo info() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.