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

Need controll of optimize()

    XMLWordPrintable

Details

    Description

      Hi

      in eZSolr::AddObject() we have:

          function addObject( $contentObject, $commit = true )
          {
          (...)
              if ( $commit )
              {
                  // For every 1000 time, call optimize
                  if ( mt_rand( 0, 999 ) == 1 )
                  {
                      $this->optimize();
                  }
              }
          }
      

      I think the running of optimize() should be controlled a bit better as it can cause a quite big burden on the server. For many setup's I would imagine that it would be way better to only run optimze() one or two times a day at dedicated times in an crontab.

      It is also misleading that the $commit parameter actually runs an optimize() operation, and not only a commit().....

      Attachments

        Activity

          People

            pborgerm pborgerm
            vl vl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: