Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-28165

Incorrect increment of object_count in ezsearch_word

    XMLWordPrintable

Details

    Description

      When updating object_count in ezsearch_word, eZSearchEngine splits the list of words in chunks of 500. But in every cycle of the loop not only the current chunk but all of the previous chunks are incremented. Which means that if there are, lets say 3 chunks, the first chunk gets an increment of +3, the second of +2, and the third of +1.

      Steps to reproduce:

      1. Create a new object with an attribute that has (plenty) more than 500 indexable words.
      2. Pick any word that is mentioned at the beginning of that attribute.
      3. Publish the object
      4. Find that word in ezsearch_word and watch the object_count value.
      5. Edit the object created in step 1 and publish it without modifying it.
      6. Find again the word in ezsearch_word and watch the object_count value.

      Result:
      The object_count has a larger value than it should.

      Pull request here: https://github.com/ezsystems/ezpublish-legacy/pull/1319

      Attachments

        Activity

          People

            Unassigned Unassigned
            d24ca137-3cee-42c9-86d9-b8fd9173fb23@accounts.ibexa.co Gabriel Finkelstein
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: