Elsatic search for anonymous users

56 views
Skip to first unread message

BrzI Channel

unread,
Apr 20, 2026, 1:51:54 PMApr 20
to AtoM Users
Hi folks,

running v 2.6.4. Logged in users have no issues - everything works fine.

Anonymous users get elasticsearch errors when trying one of these:
-advanced search
-accessing any of the "Browse by" options on the left navigation menu
-clicking the "Browse' button on the top menu bar.

I have repopulated the search index but no luck. Issue persists.
I tried looking at the elasticsearch logs but they do not seem to be human readable.

I checked the cluster health and ti looks good to me:

curl -XGET 'http://localhost:9200/_cluster/health?pretty=true'
{
  "cluster_name" : "elasticsearch",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 4,
  "active_shards" : 4,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 4,
  "delayed_unassigned_shards" : 0,

  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_s

Text of elasticsearch rrror:

Search error encountered
Elasticsearch error: Elastica\Exception\ResponseException

What else can I do... ?

BrzI Channel

unread,
Apr 20, 2026, 4:48:46 PMApr 20
to AtoM Users
Figured out the elasticsearch log ...this is what it says:

org.elasticsearch.transport.RemoteTransportException: [EQ-HwQ6][142.232.76.192:9300][indices:data/read/search[phase/query]]
Caused by: org.elasticsearch.index.query.QueryShardException: No mapping found for [i18n.en_US.title.alphasort] in order to sort on
        at org.elasticsearch.search.sort.FieldSortBuilder.build(FieldSortBuilder.java:262) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.search.sort.SortBuilder.buildSort(SortBuilder.java:156) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.search.SearchService.parseSource(SearchService.java:634) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.search.SearchService.createContext(SearchService.java:485) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:461) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:257) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.action.search.SearchTransportService$6.messageReceived(SearchTransportService.java:343) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.action.search.SearchTransportService$6.messageReceived(SearchTransportService.java:340) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) ~[elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:662) [elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:675) [elasticsearch-5.6.16.jar:5.6.16]
        at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.6.16.jar:5.6.16]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]

My quibit defautl culture is as follows:

    default_culture:        en

How can I find all the information objects that have an i18n mapping set to en_US and then update them to en ?

Thanks

Johan Pieterse

unread,
7:19 AM (11 hours ago) 7:19 AM
to AtoM Users
Hi,

The key clue is that it's anonymous-only and affects every sorted view (browse, browse-by, advanced search). That points at culture, not data. AtoM builds the sort field as i18n.<active-culture>.title.alphasort, where the culture is the visitor's current   UI culture — not anything stored on the records.

Logged-in users have an account culture of en, so they sort on i18n.en.title.alphasort, which exists. Anonymous visitors have no stored preference, so AtoM negotiates from the browser's Accept-Language header → en-US → it sets the active culture to en_US. Your index only has i18n.en.* mappings, so sorting on `ii18n.en_US.title.alphasort throws "No mapping found … in order to sort on". Unsorted requests are fine, which is why only the sorted pages break.

So reindexing won't help (the index is correct), and updating record cultures won't help either, because the en_US is coming from the request, not the data. The fix is to make sure en_US is not an available UI culture — keep your enabled language(s) as en so culture negotiation falls back to your default_culture: en   for anonymous visitors. Quick confirmation: open the site in a private window and check the culture in the URL — you'll likely see it resolve to en_US.
 
 (If you ever do want a US-English locale, the other direction is to add en_US as a real enabled culture and reindex so the mapping is created — but for a single-language en site, dropping en_US from the available cultures is the fix.)
 
 Best,
 Johan Pieterse (PhD)
https://heratio.theahg.co.za
Reply all
Reply to author
Forward
0 new messages