Why need to rebuild index so frequently?

Mr Lucky

Well-known member
Version 2.1.4 (no prefix for that!

A couple of weeks ago the search stopped working altogether, ie no search results.

Rebuilding the index solved it.

But then again yesterday, it would not find results for specific thread title. Again a rebuild it found it.

Is there a reason this should keep happening?
 
Solution
I wouldn't know about that, all I did was duplicate the site based on the guide, and changed the basic board URL. Would that mean it is still using the same search index as the live site? That may well explain things!
Probably, as the default name for the index is the name of the DB (which is what I can see in Elasticsearch).

If you don't change the index name being used, anything you do on the test site will affect your live search index.
OK, not going to be easy to troubleshoot then if it's an addon because the issue is random, not exactly reproducible. Unlikely to be server side as @MattW keeps a very well maintained server.
 
Under normal operation.

The original post didn't mention importing.

The import process explicitly mentions that the rebuild must be performed.
 
Why the restores?

That should be a last resort.

After restoring, have you confirmed ES is enabled and running in the XF ACP before any new content is posted?
 
So, the 4 restores you did yesterday, on your XF2 test site, have you confirmed you aren't using the same ES index as your live site, because I can't see any index relating to your test site, or are you using ES at all on the test site?
 
So, the 4 restores you did yesterday, on your XF2 test site,
Ah yes the test site of course, I had to restore the test site as I was going through some upgrade to 2.2 testing (so need to go back to 2.1 ). This is going to involve some quite extensive forum structure reconfiguration for me, as well as troubleshooting some bugs and so needed to restore back to a version that was good so I could work out the issues.

have you confirmed you aren't using the same ES index as your live site, because I can't see any index relating to your test site, or are you using ES at all on the test site?
I wouldn't know about that, all I did was duplicate the site based on the guide, and changed the basic board URL. Would that mean it is still using the same search index as the live site? That may well explain things!
 
I wouldn't know about that, all I did was duplicate the site based on the guide, and changed the basic board URL. Would that mean it is still using the same search index as the live site? That may well explain things!
Probably, as the default name for the index is the name of the DB (which is what I can see in Elasticsearch).

If you don't change the index name being used, anything you do on the test site will affect your live search index.
 
Solution
If you don't change the index name being used, anything you do on the test site will affect your live search index.


ve had to reconfigure ES to use a different index to the live site for my own XF2.2 testing. You would also need to do the same.

OK, thanks that's something I didn't know.

This is probably explaining the whole problem then, many thanks. (It's probably worth mentioning in the test site guide, it isn't obvious as I presumed it would default to the new database as defined in the config.php
 
@Brogan - even when using different database names, if you import the live DB into the new test DB, Enhanced Search is still configured to use the live DB name for the search index name.

I've literally just done this myself on my own dev site, and had to reconfigure Enhanced Search to create a new index name based off the new DB name.
 
Back
Top Bottom