User bio
404 bio not found
Member since Jan 8, 2016
Posts:
Edward has not published any posts yet.
Replies:

The problem is the collation. MV Query expects the collation of a string-type property and its index to be either SqlString (or SPACE in older versions) for left-justified fields or MVR for right justified fields (that aren't dates or times). If the class and index had been created starting with the mv file dictionary and using PROTOCLASS and CREATE.INDEX the collation would have been created appropriately. If the class is created manually then the collation needs to be set.

I found a couple of useful notes in the documentation. At https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY... it says:

Multivalue users who upgrade their applications from a release prior to 2012.1 to 2012.1 or later may experience a slowdown in CMQL queries that had previously made use of an index. Previously, CMQL assumed the collation for left-justified strings was SPACE. It is now SQLSTRING(150). This will not match an existing index that was created with the previous default of SPACE collation.

To correct this issue, use studio to edit the class associated with the multivalue file and change the COLLATION parameter to SQLSTRING(150) on all properties that are used as index keys. Then rebuild the affected indexes.

and the documentation for CREATE.INDEX at https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY... notes:

CREATE.INDEX assigns SqlString(150) collation to both the index and the created indexfield property. 

So you need to add collation to your property and index..

Certifications & Credly badges:
Edward has no Certifications & Credly badges yet.
Global Masters badges:
Edward has no Global Masters badges yet.
Followers:
Edward has no followers yet.
Following:
Edward has not followed anybody yet.