Notes on Indices Defined in Classes
When working with indices in class definitions, here are some points to keep in mind:

• Index definitions are only inherited from the primary (first) superclass.
• ...
 
Simple sample
having the field defined as integer would allow selecting avg but running a query in my Zen page wouldn’t show me a time format

If you the field is defined as %Integer or %String, then this is incorrect. The field type must be %Time. In this case, a time will be stored in the database as number, and the query will display the time as a string.

Here is a small example:

select 166 seconds,%external(cast(+166.5 as TIME)) "avg"

Output:

seconds = 166
avg = 00:02:46
 
Simple sample

By default, data in the global is stored as

glbD(ID)=$LB(%%CLASSNAME,prop1,prop2,..,propN)

The total size of the string cannot exceed 3641144. Therefore, if you have a field length >3.6E6, and there are several such fields, the limit is exceeded. To work around this, you need to change storage for your class.

For example so:

glbD(ID)=$LB(%%CLASSNAME)
glbD(ID,"prop1")=prop1
glbD(ID,"prop2")=prop2
...
glbD(ID,"propN")=propN
 
Simple example

I'm not sure if it's %Text at all.

Made a small example:

Class dc.test Extends %Persistent
{

Index mySimilarityIndex On SettingsJSON(KEYS) [ Data = SettingsJSON(ELEMENTS) ];

Property SettingsJSON As %Text(LANGUAGECLASS "%Text.English"MAXLEN 3600000SIMILARITYINDEX "mySimilarityIndex");

ClassMethod Test()
{
  ..%KillExtent()
  
  json=$tr($j("",3600000)," ","0")
  &sql(insert into del.t(SettingsJSONvalues(:json))
  
  w $l(json),":",SQLCODE
}

}

Output:
3600000:0

Class dc.test Extends %Persistent
{

Property As %Integer;

ClassMethod Test()
{

  ..%KillExtent()

  &sql(insert into dc.test(Fvalues(22))
  &sql(insert into dc.test(Fvalues(11))

  label "00007I0Q"
  &sql(select ID into :cnt from dc.test where ID :label)
  
  SQLCODE,":",cnt
}

}

Output for Caché 2018.1:

100:00007I0Q

Output for IRIS 2021.2:

100:

PS: it is a pity that my answer was ignored.

Any event that occurs outside of the modal group (such as a mouse click) automatically hides the modal groupproof.

Use Popup windows with modal=yes or Dialogs.

PS: if you really need to use "Model Groups", then you need to do two things for this:

  1. override the method onCanEndModalHandler
  2. override the method hideGroup(). This is necessary to prohibit the close button in the upper right corner
 
Here is a small variant:
Is it OK to use this partially rebuilt index if I don't care about data that isn't indexed? Did you do this before?

I didn't build indexes manually, except for tests. If the index is not built for all data, then the query will see only the data for which the index exists.

 
Try simple example:

If we open the source code of the class for the Status field, we will see the following:

Class Ens.DataType.MessageStatus Extends %Integer
{

Parameter DISPLAYLIST = ",Created,Queued,Delivered,Discarded,Suspended,Deferred,Aborted,Error,Completed";

Parameter VALUELIST = ",1,2,3,4,5,6,7,8,9";

}

Therefore , the following conclusions can be drawn:

  1. For Embedded SQL the RuntimeMode is Logical
  2. For SQL Explorer (Portal) the RuntimeMode is Display

Hence the leapfrog in the results.