Overview

I tried Wagtail, so here are my notes on issues I encountered.

I basically followed this tutorial:

https://docs.wagtail.org/en/v5.0.1/getting_started/tutorial.html

Search Function

When I added a page with a Japanese title of “My First Article” (はじめての記事), the following search did not return any results.

http://localhost:8000/admin/pages/search/?q=はじめて

On the other hand, the following search did return results. It seems that partial matching for Japanese is not supported by default.

http://localhost:8000/admin/pages/search/?q=はじめての記事

Wagtail API

The API documentation was found at:

https://docs.wagtail.org/en/v5.0.1/advanced_topics/api/index.html

By also adding rest_framework as described on the above site, I was able to obtain results as shown below.

However, for the app running on localhost:8000, the hostname in the returned results was showing as localhost.

This issue was resolved by modifying it from the admin panel, as described in the following article:

https://stackoverflow.com/questions/52540254/edit-approved-email-points-to-localhost

Specifically, I changed the port number on the /admin/sites/ page.

?search Parameter

Similar to the search function mentioned earlier, Japanese text required an exact match.

http://localhost:8000/api/v2/pages/?search=はじめての記事

Elasticsearch

I tried integrating with Elasticsearch.

https://docs.wagtail.org/en/v5.0.1/topics/search/backends.html

This time I tried AWS OpenSearch, but encountered the following error.

elasticsearch.exceptions.UnsupportedProductError:TheclientnoticedthattheserverisnotElasticsearchandwedonotsupportthisunknownproduct

A similar issue has been raised at the following, but it appeared to be unsupported at the time.

https://github.com/wagtail/wagtail/issues/7920

Summary

Some information may be inaccurate, but I hope this serves as a useful reference when using Wagtail.