How to automate Content indexing in confluence server

  1.  I will  like to  trigger content indexing  every  morning via a script  do we have rest  api  to  do  this via the curl command ?





2 answers

2 accepted

1 vote
Answer accepted

There's an obvious question - why do you want to do this?

Confluence does not need to be re-indexed regularly, pages are indexed automatically.  Needing to re-index is indicative of a significant change or a problem with the data.  So what have you done to it that makes it seem like it needs doing every morning?

0 votes
Answer accepted

Hello Nic,


My confluence is  working fine,  but to  be on  safe side with  search  content in confluence i  would like to  perform  it time to  time so  do  we have a possibility  like in Jira or not ?



It's the same as Jira - run an external script that triggers it.

Complete waste of time though.  Indexing in Jira is only needed if something goes wrong or for some config changes.  Same goes for Confluence - it's pointless re-indexing a working system.  In fact, it's worse, because searches stop working during a re-index.

Hello Nic,

It is not pointless to re-index in confluence(search indexing also called content indexing) at  least once a  month,  sometimes i  have problem  with searching for users  in confluence even though  user in  available in directory when i  want to add  permission to user in  a page,  but when i  do  content indexing user appears

I have search  for rest api  to  trigger indexing automatically i cannot find,  do  you  know where to  find the rest API ?


Best regards,


If you think you need to re-index regularly, then that tells me you have a problem with the indexing that you need to fix, not just hide by regularly rebuilding.

You need to look into why your users can't be found, as you have a broken setup somewhere.

So tell  me exactly  what  content  indexing( search indexing ) is doing exactly

The Confluence database is built as a datastore for your pages.  It is not designed for search. 

Imagine the basics - a page.  That's some metadata in a table, plus a big block of content.  Searching for a word in that sort of table is quite slow and intensive.

So, there is a fast, local index built in the application.  The data is organised differently - for pages for example, there's a pile of word-stems pointing to pages.

Every create or edit to a page updates the index.  In a healthy system, that means the index will be up to date and correct at all times. 

(It indexes other things too, but you get the gist from just the page stuff above)

"I need to re-index regularly" is a symptom of something breaking the index.  You've said you have problems looking for users.  That implies something is wrong in the user directory setup.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

259 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you