Hi everyone,
I’m running a restaurant-based website that focuses on Texas Roadhouse menu updates, reviews, and nearby location listings. I’ve implemented Elasticsearch to power the internal search function on my site so users can look up dishes, restaurant branches, and coupons quickly. Everything was working fine initially, but over the past week, I’ve noticed that search results are becoming inconsistent and occasionally outdated. For example, when I update a menu item or add a new restaurant location, it doesn’t appear in search results right away — sometimes it takes several hours, and sometimes not at all.
I’m using Elasticsearch 8.14 on an Ubuntu 22.04 VPS. The website’s backend is built with Node.js and connects to Elasticsearch through the official client. Indexing happens automatically when new content is published through the CMS. However, when I check the cluster health, it shows as “yellow” most of the time, and the logs occasionally contain warnings about unassigned shards. I’m wondering if this could be causing the delay in document updates or partial failures in the indexing process.
Another issue is that some of the indexed fields seem to return partial matches or wrong results. For instance, when I search for “Texas Roadhouse ribs,” the top result is sometimes a blog post about “steak deals” instead of the actual ribs menu item. I’ve double-checked my mapping configuration, and I’m using the standard analyzer for most text fields. I suspect I might need a custom analyzer or a better query setup, but I’m not sure how to optimize that for restaurant and food-related content where names often overlap.
I also noticed a spike in resource usage when the indexing job runs. CPU usage on the server goes up to 90%, and the Elasticsearch process sometimes crashes under load. I’ve already tried increasing heap size and limiting batch sizes during indexing, but the issue persists. You can check my website https://thetexasroadhousemenu.com/. When the crash occurs, I occasionally lose partial data in the index, which might be contributing to the missing search results. My concern is that I might have a configuration issue with replica shards or memory allocation.
Additionally, I’m seeing slow query responses even for simple searches. Average search time has gone from under 100ms to over 1s. I’ve tried enabling query caching and optimizing field mappings, but it hasn’t made much of a difference. The /_cat/indices?v output shows a few indices growing unexpectedly large, possibly due to reindexing or duplicate entries. Could this be bloating performance and making search slower?
Has anyone else encountered similar issues where Elasticsearch becomes slow or unreliable with frequent content updates? What’s the best approach to keep my index fresh and search results accurate for a medium-traffic website like mine? Any guidance on optimizing mapping, analyzers, or shard configuration would be greatly appreciated. Sorry for the long post!