Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-376

Ver.2.9.2 SpanOrQuery.ToString() bug

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Bad conversion from java code.
      ====================
      System.Collections.IEnumerator i = clauses.GetEnumerator();
      while (i.MoveNext())
      {
      SpanQuery clause = (SpanQuery) i.Current;
      buffer.Append(clause.ToString(field));
      if (i.MoveNext())

      { buffer.Append(", "); }
      }
      ====================
      Shoud be changed to something like:
      ====================
      int j = 0;
      while (i.MoveNext())
      {
      j++;
      SpanQuery clause = (SpanQuery) i.Current;
      buffer.Append(clause.ToString(field));
      if (j<clauses.Count)
      { buffer.Append(", "); }

      }

      ====================

        Attachments

        1. SpanOrQuery.patch
          0.8 kB
          Digy

          Activity

            People

            • Assignee:
              digydigy Digy
              Reporter:
              antonxz Andrei Iliev
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: