Overview

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

I basically followed the tutorial below:

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

Search Feature

When I added a page with the Japanese title “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 appeared that partial matching for Japanese is not supported by default.

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

Wagtail API

Information about the API is available here:

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

By also adding rest_framework following the site above, I was able to get results as shown below.

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

This issue was resolved by modifying it through the admin panel, following this 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

As with the search feature above, it appeared that exact matching was required for Japanese.

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 the following error occurred.

elasticsearch.exceptions.UnsupportedProductError: The client noticed that the server is not Elasticsearch and we do not support this unknown product

A similar issue was raised in the following link, but it appeared to be unsupported at the time.

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

Summary

This may contain some inaccuracies, but I hope it serves as a useful reference when using Wagtail.