OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Content Item List search is case sensitive (Postgresql)

Open jptissot opened this issue 6 years ago • 10 comments

The Content List search is case sensitive. This only seems to happen for Postgresql. YesSQL renders a like ='search string' where clause. For Postgresql, we would need to render the ilike = ' search string' for the search to be case insensitive

jptissot avatar Jan 22 '20 19:01 jptissot

@sebastienros do you have any ideas on how to fix this one ? Maybe a yessql issue instead ?

jptissot avatar Mar 06 '20 16:03 jptissot

@jptissot yes this should probably be done in yessql, it should just be a matter of changing the dialect for postgresql (just a matter of making sure nothing else breaks from it...)

deanmarcussen avatar Mar 06 '20 16:03 deanmarcussen

What about adding an extra column for searching on DisplayText that would be normalized: NormalizedDisplayText. And use it in this screen.

Note that we might have to do it for other fields that are used for search (TextField index) and also for queries that are used for unicity checks, like on Autoroute deduping.

sebastienros avatar Mar 12 '20 19:03 sebastienros

I think we should use Lucene for that one and rely on the Lucene Analyzer for determining if it should be case sensitive or not. Lucene is made for that.

Skrypt avatar Mar 12 '20 19:03 Skrypt

PostgreSql 12 now supports case insensitive collations https://news.ycombinator.com/item?id=19991452

jptissot avatar Jun 09 '20 12:06 jptissot

So, it seems this isn't an issue with Postgres, right? And in the meantime we also have Lucene/Elasticsearch full-text search for the admin too.

Piedone avatar May 03 '24 20:05 Piedone

It seems that this issue didn't really move for quite a while. Is this something you'd like to revisit any time soon or should we close? Please reply.

github-actions[bot] avatar May 25 '24 01:05 github-actions[bot]

Closing this issue because it has been stale for very long. If you think this is still relevant, feel free to reopen it.

github-actions[bot] avatar Jun 02 '24 02:06 github-actions[bot]

This actually is still an issue.

Piedone avatar Jan 07 '25 22:01 Piedone

Maybe it would be a solution to make YesSql have partial support for the second parameter of Contains and translate it to ILIKE when a case insensitive option is passed?

Piedone avatar Jan 07 '25 22:01 Piedone