Docsearch: Only update the index if required

Signed-off-by: Jerome Flesch <jflesch@gmail.com>