webtrees icon indicating copy to clipboard operation
webtrees copied to clipboard

Postgres - General search would be better if case insensitive

Open kalafut opened this issue 4 years ago • 5 comments

It seems that the General Search function is case sensitive, but I feel it would be more convenient if it wasn't. It would be nice to quickly type "laura" and have "Laura" records to show up. More of an issue was when I was searching for "Joann" and thought there was no record, when in fact the correct spelling of the name was "JoAnn" and the record did exist.

Thanks for Webtrees! Great to find a rebooted PHPGedView which I used years ago.

kalafut avatar Jan 02 '21 21:01 kalafut

What database do you use? (e.g. MySQL or Postgres)

fisharebest avatar Jan 04 '21 08:01 fisharebest

I'm using Postgres.

kalafut avatar Jan 05 '21 03:01 kalafut

The webtrees setup page shows the warning "Support for PostgreSQL is experimental."

MySQL provides collation-aware searching (i.e. case-insensitive).

Postgres doesnt seem to provide this by default. Collations can be created, but there is little online documentation/examples and it seems to be dependant on the collations available in the operating system - and there is no way to detect these.

fisharebest avatar Jan 05 '21 09:01 fisharebest

That’s fine, and useful to know. As I role this out to some others I might just revert to MySQL to get past some of the sharp edges. Everything else I’m storing (other apps) is in Postgres so I’m glad to see there is work on supporting it.

kalafut avatar Jan 05 '21 14:01 kalafut

Postgres doesnt seem to provide this by default.

Postgres provides ILIKE, a case-insensitive version of LIKE. Is that what's needed for this?

mpfaff avatar May 30 '22 04:05 mpfaff