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

Deleting docs of all returned Hits during search causes ArrayIndexOutOfBoundsException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.3
    • Component/s: core/index
    • Labels:
      None
    • Environment:

      WindowsXPSP1/Lenovo-T60p

    • Lucene Fields:
      New, Patch Available

      Description

      For background user discussion:
      http://www.nabble.com/document-deletion-problem-to14414351.html

      Hits h = m_indexSearcher.search(q); // Returns 11475 documents 
      for(int i = 0; i < h.length(); i++) 
      { 
        int doc = h.id(i); 
        m_indexSearcher.getIndexReader().deleteDocument(doc);  <-- causes ArrayIndexOutOfBoundsException when i = 6400
      } 
      

        Attachments

        1. TestSearchDelete.java
          3 kB
          Doron Cohen
        2. lucene-1096.patch
          9 kB
          Doron Cohen
        3. lucene-1096.patch
          11 kB
          Doron Cohen

          Activity

            People

            • Assignee:
              doronc Doron Cohen
              Reporter:
              snowhow Tushar B
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: