Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6498

RegexpQueryNode inconsistent treatment of begin and end parameters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.10.4
    • Fix Version/s: None
    • Component/s: modules/queryparser
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      RegexpQueryNode has some questionable treatment of the begin and end parameters:

        public RegexpQueryNode(CharSequence field, CharSequence text, int begin,
            int end) {
          this.field = field;
          this.text = text.subSequence(begin, end);
        }
      

      when contrasted with FieldQueryNode:

        public FieldQueryNode(CharSequence field, CharSequence text, int begin,
            int end) {
          this.field = field;
          this.text = text;
          this.begin = begin;
          this.end = end;
          this.setLeaf(true);
        }
      

      I am now not entirely sure which of the two is correct...

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              trejkaz Trejkaz
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: