Page 1 of 1

Case insensitive search

Posted: Wed Oct 25, 2017 9:44 am
by Rabbit80
When I am searching for a document by attributes, is it possible to make the search case insensitive?

For example - search by field ext_Department for "accounts" needs to return results for accounts, Accounts and ACCOUNTS. The caseSensitive flag appears to make no difference.

Is there any other way I can do this?

Re: Case insensitive search

Posted: Mon Oct 30, 2017 5:52 pm
by agaspa
The search is case sensitive,
but the behaviour I think you're expected might be because of the settings of MySQL.
In particular under certain circumstances MySQL can returns results without respecting the case expressed in the query.

See also
MySQL case sensitive query

B.5.4.1 Case Sensitivity in String Searches

MySQL case insensitive select

Re: Case insensitive search

Posted: Mon Oct 30, 2017 6:04 pm
by Rabbit80
I assume the table in question is ld_document_ext?

In this case, the collation is set to latin1_swedish_ci - the ci at the end denoting case-insensitive.

A search directly on the database appears to perform correctly..

SELECT * FROM logicaldoc.ld_document_ext WHERE ld_stringvalue = "accounts"; - returns results for all variations of the word accounts. Via webservices search it will only match exact case.