Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 770297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:28:37+00:00 2026-05-14T18:28:37+00:00

I will be uploading my website to a VPS soon. It is a classifieds

  • 0

I will be uploading my website to a VPS soon. It is a classifieds website which uses Solr integrated with MySql.

Solr is updated whenever a new classified is put or deleted.

I need a way to make the commit() and optimize() be automated, for example once every 3 hours or so.

How can I do this? (Details Please)
When is it ideal to optimize?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:28:38+00:00Added an answer on May 14, 2026 at 6:28 pm

    You could set up a cron task that periodically executes a remote call to the Solr REST interface, e.g:

    curl 'http://<SOLR_INSTANCE_URL>/update?optimize=true'
    

    Find further info on updating the Solr index here.

    Quoting the Solr tutorial:

    Commit can be an expensive operation
    so it’s best to make many changes to
    an index in a batch and then send the
    commit command at the end. There is
    also an optimize command that does the
    same thing as commit, in addition to
    merging all index segments into a
    single segment, making it faster to
    search and causing any deleted
    documents to be removed.

    UPDATE:
    Besides, the auto-commit feature can be enabled in solrconfig.xml (within the UpdateHandler section):

    <autoCommit>
          <maxDocs>10000</maxDocs> <!-- maximum uncommited docs before autocommit triggered -->
          <maxTime>86000</maxTime> <!-- maximum time (in MS) after adding a doc before an autocommit is triggered -->
    </autoCommit>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to Rails, I wanted to make a website for uploading files: music,
I'm building a website currently with a page for uploading images. The images will
I am creating a website similar to youtube, so after uploading videos (that will
I am developing a web application where users will be uploading a large number
Using Struts 2: when will the .tmp file - that gets created after uploading
I have a project where client will be uploading his songs to the web
I am working on a joomla website but as I am new to joomla
I am willing to implement website where will be top 10 best members' pictures
I am going to work on a video website where users/admin will be able
I'm using a relational MySQL database for a website where people can create online

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.