Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2108 commits
Select commit Hold shift + click to select a range
55607fe
New translations listbox-object.md (Spanish)
arnaud4d Apr 14, 2026
5feca66
New translations formulaclass.md (Spanish)
arnaud4d Apr 14, 2026
5e33664
New translations wp-new-style-sheet.md (Spanish)
arnaud4d Apr 14, 2026
e763753
New translations wp-delete-style-sheet.md (Spanish)
arnaud4d Apr 14, 2026
6b124c7
New translations wp-get-style-sheet.md (Spanish)
arnaud4d Apr 14, 2026
a328a0b
New translations ordering.md (Spanish)
arnaud4d Apr 14, 2026
2066fea
New translations async.md (Spanish)
arnaud4d Apr 14, 2026
5992bec
New translations async.md (Spanish)
arnaud4d Apr 14, 2026
2254074
New translations command-index.md (Japanese)
arnaud4d Apr 14, 2026
95fcea3
New translations user-new.md (Japanese)
arnaud4d Apr 14, 2026
ec74e12
New translations wp-new-style-sheet.md (Japanese)
arnaud4d Apr 14, 2026
e519ebd
New translations wp-delete-style-sheet.md (Japanese)
arnaud4d Apr 14, 2026
24f6ef8
New translations wp-get-style-sheet.md (Japanese)
arnaud4d Apr 14, 2026
7c3a5b9
New translations command-index.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
daec12b
New translations user-new.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
2a4b33c
New translations wp-new-style-sheet.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
e826e0f
New translations wp-delete-style-sheet.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
c015f07
New translations wp-get-style-sheet.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
1464b7d
New translations imapnotifier.md (Spanish)
arnaud4d Apr 14, 2026
d442cfc
Feature/server execution (#3261)
arnaud4d Apr 14, 2026
a5f1f6b
New translations wp-import-style-sheets.md (French)
arnaud4d Apr 14, 2026
4619ea6
New translations wp-import-style-sheets.md (Spanish)
arnaud4d Apr 14, 2026
00bf2a8
New translations wp-import-style-sheets.md (Japanese)
arnaud4d Apr 14, 2026
f9e65cc
New translations wp-import-style-sheets.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
824d582
New translations entityselectionclass.md (Spanish)
arnaud4d Apr 14, 2026
ffaf8a2
New translations fileclass.md (Spanish)
arnaud4d Apr 14, 2026
82e957b
New translations folderclass.md (Spanish)
arnaud4d Apr 14, 2026
001ddbf
New translations properties_listbox.md (Spanish)
arnaud4d Apr 14, 2026
6354689
New translations properties_object.md (Spanish)
arnaud4d Apr 14, 2026
42fca15
New translations properties_resizingoptions.md (Spanish)
arnaud4d Apr 14, 2026
e4bff8e
New translations properties_textandpicture.md (Spanish)
arnaud4d Apr 14, 2026
c813871
New translations current.json (Japanese)
arnaud4d Apr 14, 2026
fc0680e
New translations blobclass.md (Spanish)
arnaud4d Apr 14, 2026
d1e3944
New translations collectionclass.md (Spanish)
arnaud4d Apr 14, 2026
3bfeba9
New translations entityclass.md (Spanish)
arnaud4d Apr 14, 2026
dddad08
New translations entityselectionclass.md (Spanish)
arnaud4d Apr 14, 2026
ef44d53
New translations fileclass.md (Spanish)
arnaud4d Apr 14, 2026
bc685b5
New translations folderclass.md (Spanish)
arnaud4d Apr 14, 2026
af50b90
New translations cli.md (Spanish)
arnaud4d Apr 14, 2026
eb28aa9
New translations properties_listbox.md (Spanish)
arnaud4d Apr 14, 2026
9bbda9a
New translations properties_object.md (Spanish)
arnaud4d Apr 14, 2026
2ed805f
New translations properties_resizingoptions.md (Spanish)
arnaud4d Apr 14, 2026
a8bf8ef
New translations properties_textandpicture.md (Spanish)
arnaud4d Apr 14, 2026
2838a85
New translations blobclass.md (French)
arnaud4d Apr 14, 2026
85b0f2b
New translations collectionclass.md (French)
arnaud4d Apr 14, 2026
ebb6441
New translations emailobjectclass.md (French)
arnaud4d Apr 14, 2026
4e9942c
New translations fileclass.md (French)
arnaud4d Apr 14, 2026
fc18cea
New translations blobclass.md (Spanish)
arnaud4d Apr 14, 2026
c7965d1
New translations collectionclass.md (Spanish)
arnaud4d Apr 14, 2026
0bbcb95
New translations emailobjectclass.md (Spanish)
arnaud4d Apr 14, 2026
ebad8d2
New translations fileclass.md (Spanish)
arnaud4d Apr 14, 2026
46cacaf
New translations blobclass.md (Japanese)
arnaud4d Apr 14, 2026
755c906
New translations collectionclass.md (Japanese)
arnaud4d Apr 14, 2026
019575e
New translations emailobjectclass.md (Japanese)
arnaud4d Apr 14, 2026
1f04491
New translations fileclass.md (Japanese)
arnaud4d Apr 14, 2026
69b6ffc
New translations blobclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
2bb8995
New translations collectionclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
35d7496
New translations emailobjectclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
9d08451
New translations fileclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
548f76e
New translations folderclass.md (French)
arnaud4d Apr 14, 2026
237952d
New translations mailattachmentclass.md (French)
arnaud4d Apr 14, 2026
935558a
New translations sessionclass.md (French)
arnaud4d Apr 14, 2026
29f9106
New translations folderclass.md (Spanish)
arnaud4d Apr 14, 2026
421cc83
New translations mailattachmentclass.md (Spanish)
arnaud4d Apr 14, 2026
eedb569
New translations sessionclass.md (Spanish)
arnaud4d Apr 14, 2026
aa7660b
New translations folderclass.md (Japanese)
arnaud4d Apr 14, 2026
661f98c
New translations mailattachmentclass.md (Japanese)
arnaud4d Apr 14, 2026
92b7cd8
New translations sessionclass.md (Japanese)
arnaud4d Apr 14, 2026
3d1ce0f
New translations folderclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
4b9f506
New translations mailattachmentclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
1a173df
New translations sessionclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
34496a2
New translations webserverclass.md (French)
arnaud4d Apr 14, 2026
355cc1b
New translations webserverclass.md (Spanish)
arnaud4d Apr 14, 2026
7f4b3a9
New translations webserverclass.md (Japanese)
arnaud4d Apr 14, 2026
75dd6be
New translations webserverclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
5d61534
New translations classes.md (French)
arnaud4d Apr 14, 2026
325169f
New translations classes.md (Spanish)
arnaud4d Apr 14, 2026
57640d2
New translations classes.md (Japanese)
arnaud4d Apr 14, 2026
30d54f6
New translations classes.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
df0e11f
New translations dt_object.md (French)
arnaud4d Apr 14, 2026
7b7145c
New translations dt_object.md (Spanish)
arnaud4d Apr 14, 2026
bca5b00
New translations dt_object.md (Japanese)
arnaud4d Apr 14, 2026
8ee4ec4
New translations dt_object.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
504664e
New translations quick-tour.md (Spanish)
arnaud4d Apr 14, 2026
8120bc3
New translations clientserver.md (French)
arnaud4d Apr 14, 2026
e580baa
New translations clientserver.md (Spanish)
arnaud4d Apr 14, 2026
581ac33
New translations clientserver.md (Japanese)
arnaud4d Apr 14, 2026
147853d
New translations clientserver.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
159f9e2
New translations properties_object.md (Spanish)
arnaud4d Apr 14, 2026
7e7c2b1
New translations updates.md (French)
arnaud4d Apr 14, 2026
2e307ad
New translations client-server-optimization.md (French)
arnaud4d Apr 14, 2026
1dc9d35
New translations ordaclasses.md (French)
arnaud4d Apr 14, 2026
ad704fa
New translations updates.md (Spanish)
arnaud4d Apr 14, 2026
13bb50b
New translations client-server-optimization.md (Spanish)
arnaud4d Apr 14, 2026
c04a916
New translations ordaclasses.md (Spanish)
arnaud4d Apr 14, 2026
f6f6d33
New translations updates.md (Japanese)
arnaud4d Apr 14, 2026
4342bf9
New translations client-server-optimization.md (Japanese)
arnaud4d Apr 14, 2026
aee270a
New translations ordaclasses.md (Japanese)
arnaud4d Apr 14, 2026
e35b29f
New translations updates.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
bdc9b92
New translations client-server-optimization.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
7b10d79
New translations ordaclasses.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
8ab118f
New translations components.md (Spanish)
arnaud4d Apr 14, 2026
c999a15
New translations orda-events.md (French)
arnaud4d Apr 14, 2026
e83f964
New translations vectorclass.md (French)
arnaud4d Apr 14, 2026
50f49f6
New translations orda-events.md (Spanish)
arnaud4d Apr 14, 2026
f30a299
New translations vectorclass.md (Spanish)
arnaud4d Apr 14, 2026
b4bdbd5
New translations orda-events.md (Japanese)
arnaud4d Apr 14, 2026
77b32f8
New translations vectorclass.md (Japanese)
arnaud4d Apr 14, 2026
c395c8f
New translations orda-events.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
5995ce4
New translations vectorclass.md (Portuguese, Brazilian)
arnaud4d Apr 14, 2026
b55ef01
New translations collectionclass.md (Spanish)
arnaud4d Apr 15, 2026
f2054c4
New translations properties_object.md (Spanish)
arnaud4d Apr 15, 2026
a7a2a3b
New translations sessions.md (French)
arnaud4d Apr 15, 2026
c4f63b0
New translations sessions.md (Spanish)
arnaud4d Apr 15, 2026
b0ee01b
New translations sessions.md (Japanese)
arnaud4d Apr 15, 2026
a890f5a
New translations sessions.md (Portuguese, Brazilian)
arnaud4d Apr 15, 2026
da3f077
New translations collectionclass.md (Spanish)
arnaud4d Apr 15, 2026
e049aed
New translations properties_object.md (Spanish)
arnaud4d Apr 15, 2026
afe360c
New translations async.md (Spanish)
arnaud4d Apr 15, 2026
add48b2
New translations formulaclass.md (French)
arnaud4d Apr 15, 2026
c4eb4fc
New translations methodclass.md (French)
arnaud4d Apr 15, 2026
e438b4a
New translations formulaclass.md (Spanish)
arnaud4d Apr 15, 2026
84cf877
New translations methodclass.md (Spanish)
arnaud4d Apr 15, 2026
0990bf5
New translations formulaclass.md (Japanese)
arnaud4d Apr 15, 2026
b114fb3
New translations methodclass.md (Japanese)
arnaud4d Apr 15, 2026
c16ee83
New translations formulaclass.md (Portuguese, Brazilian)
arnaud4d Apr 15, 2026
97f0791
New translations methodclass.md (Portuguese, Brazilian)
arnaud4d Apr 15, 2026
b6cdeb0
New translations async.md (Spanish)
arnaud4d Apr 15, 2026
3cd41d3
New translations async.md (Spanish)
arnaud4d Apr 15, 2026
1a3b3a2
Merge branch 'l10n_main'
arnaud4d Apr 15, 2026
bb5928d
fix links
arnaud4d Apr 15, 2026
36253ee
New Crowdin updates (#3263)
arnaud4d Apr 15, 2026
4dd8606
small fixes (#3264)
arnaud4d Apr 15, 2026
6268385
New Crowdin updates (#3265)
arnaud4d Apr 16, 2026
1d9807b
Feature/ai kit alias (#3267)
arnaud4d Apr 16, 2026
e34d364
New Crowdin updates (#3266)
arnaud4d Apr 17, 2026
acbf50f
New Crowdin updates (#3268)
arnaud4d Apr 17, 2026
74cbe7e
Update updates.md (#3269)
arnaud4d Apr 17, 2026
01e1a6b
New Crowdin updates (#3270)
arnaud4d Apr 20, 2026
8cbb85b
fixes (#3271)
arnaud4d Apr 20, 2026
47c83bb
Fix/crypter fr (#3272)
arnaud4d Apr 20, 2026
947633f
Fix/crypter fr (#3273)
arnaud4d Apr 21, 2026
50cb68b
reported 21 21R2 (#3274)
arnaud4d Apr 21, 2026
44e5657
Merge branch 'main' into main
arnaud4d Apr 21, 2026
87ec734
Version 21-R3 created
arnaud4d Apr 21, 2026
9428108
Update Crowdin configuration file
arnaud4d Apr 22, 2026
f12a315
New Crowdin updates (#3276)
arnaud4d Apr 22, 2026
e9f88ae
fix version label
arnaud4d Apr 23, 2026
7a947d5
Merge branch 'main' into main
arnaud4d Apr 23, 2026
a9273af
New Crowdin updates (#3277)
arnaud4d Apr 23, 2026
49b0b2d
fix themes in home (#3278)
arnaud4d Apr 23, 2026
ace56c7
Fix/after 21 r3 (#3280)
arnaud4d Apr 24, 2026
6f0f2a9
New Crowdin updates (#3279)
arnaud4d Apr 24, 2026
f0be837
New Crowdin updates (#3281)
arnaud4d Apr 27, 2026
709ddfa
Update README.md
arnaud4d Apr 27, 2026
65377ec
fixes (#3282)
arnaud4d Apr 27, 2026
35bdbd5
fix(redirection): correct version iteration to include all versions
e-marchand Apr 28, 2026
ec89b6a
New Crowdin updates (#3283)
arnaud4d Apr 28, 2026
ce8fe5e
Merge branch 'main' of https://github.com/doc4d/docs into pr/575
arnaud4d Apr 28, 2026
f02f7ca
Merge branch '4d:main' into main
arnaud4d Apr 28, 2026
5810507
New Crowdin updates (#3284)
arnaud4d Apr 28, 2026
a4d0819
fix param name imap (#3286)
arnaud4d Apr 29, 2026
b7c21e1
Update README with conflict resolution steps
arnaud4d Apr 29, 2026
03bea81
Modify version matching loop to skip first version
e-marchand Apr 29, 2026
29f6108
Feature/form open explained (#3287)
arnaud4d Apr 29, 2026
f7657eb
New Crowdin updates (#3285)
arnaud4d Apr 30, 2026
184041e
Feature/print winui liquid (#3289)
arnaud4d Apr 30, 2026
2913e6d
ci: Add step to fix version-dropdown links in workflow
e-marchand May 1, 2026
352349f
ci: Fix action reference in workflow-build.yml
e-marchand May 1, 2026
160afa4
Update crowdin.yml
arnaud4d May 5, 2026
07861b9
New Crowdin updates (#3288)
arnaud4d May 5, 2026
e830b59
Update crowdin.yml
arnaud4d May 5, 2026
f5ac3df
Update Crowdin configuration file
arnaud4d May 5, 2026
3d8fe1b
Update updates.md
arnaud4d May 5, 2026
ddf29eb
Update crowdin.yml
arnaud4d May 6, 2026
82283e7
WritePro: fix links on some file moved to some legacy folders
e-marchand May 6, 2026
22ad45d
New Crowdin updates (#3290)
arnaud4d May 6, 2026
dbdd35f
swizzle the code that build the version menu to find other versions o…
e-marchand May 6, 2026
f5ac671
Document fix for version switch between 21.x and 21 R+
arnaud4d May 6, 2026
41c064d
added iframes (#3292)
arnaud4d May 6, 2026
1a1f715
New Crowdin updates (#3293)
arnaud4d May 7, 2026
97ccf6e
Update crowdin.yml
arnaud4d May 7, 2026
7a023d7
Merge branch 'main' into main
arnaud4d May 7, 2026
d177b38
Merge branch '4d:main' into main
arnaud4d May 7, 2026
7b914f0
Fix/add classtore class (#3294)
arnaud4d May 7, 2026
6124de8
fixes
arnaud4d May 7, 2026
e990436
Update Crowdin configuration file
arnaud4d May 7, 2026
81bc5ea
fixes links
arnaud4d May 7, 2026
f9e0214
New Crowdin updates (#3295)
arnaud4d May 11, 2026
97f4fe6
added see also + fix link to jmap spec (#3296)
arnaud4d May 11, 2026
50f117d
Fix/links imap (#3297)
arnaud4d May 11, 2026
547b59f
Merge branch '4d:main' into main
arnaud4d May 11, 2026
99b7216
added see also addflags
arnaud4d May 11, 2026
ec6cba4
updated screens
arnaud4d May 11, 2026
1ed79ca
print images
arnaud4d May 11, 2026
58e22e1
fixes in commands
arnaud4d May 11, 2026
c7f6b5c
fixed redraw syntax
arnaud4d May 11, 2026
6faa452
fix of the fix redraw
arnaud4d May 11, 2026
1300abe
fix(ACI0106344): add missing Variable in ACCUMULATE syntax
e-marchand May 13, 2026
ec7aedb
New Crowdin updates (#3298)
arnaud4d May 14, 2026
2d310af
New Crowdin updates (#3299)
arnaud4d May 15, 2026
38e5dd8
New Crowdin updates (#3300)
arnaud4d May 18, 2026
0a5ae7b
New Crowdin updates (#3302)
arnaud4d May 21, 2026
2fb8ec6
show message in version menu if page do not exist in previous version
e-marchand May 22, 2026
39dfa95
New Crowdin updates (#3303)
arnaud4d May 22, 2026
e2c062a
fix(syntax): make parameters optional for OBJECT Get pointer, Window …
e-marchand May 22, 2026
a0bea02
for menu version skip main page when checking if page available
e-marchand May 22, 2026
acf0a90
fixed legacy links
arnaud4d May 22, 2026
d0a1804
Update updates.md
arnaud4d May 22, 2026
6581817
New Crowdin updates (#3304)
arnaud4d May 25, 2026
d640140
version menu: change message and restore icon
e-marchand May 26, 2026
d6603a7
New Crowdin updates (#3305)
arnaud4d May 27, 2026
9bf89a8
New Crowdin updates (#3306)
arnaud4d May 28, 2026
4a0de3c
feat(aikit): resync doc to remove wrong model name with :
e-marchand May 28, 2026
7dddeea
feat(aikit): report 21R3 4a0de3c4ed322e9608b53cfd47710018c471812a
e-marchand May 28, 2026
e4dc8df
fix(aikit): 21.X link on OpenAI doc has change
e-marchand May 28, 2026
48d73ab
fix(aikit): revert syncing fixes that were not reported to the aikit …
e-marchand May 28, 2026
ab605a4
New Crowdin updates (#3308)
arnaud4d May 29, 2026
8329732
New Crowdin updates (#3309)
arnaud4d May 29, 2026
860df87
Fix/set query lock (#3310)
arnaud4d Jun 1, 2026
ff13214
New Crowdin updates (#3312)
arnaud4d Jun 1, 2026
e42a237
New Crowdin updates (#3313)
arnaud4d Jun 1, 2026
9d9d560
fixed XML syntaxes (#3314)
arnaud4d Jun 1, 2026
8835a20
fix syntax XML and add OpenSSL 4.0 (#3315)
arnaud4d Jun 1, 2026
51aafa4
fix(syntax): error if passing a wrong version version folders
e-marchand Jun 1, 2026
753cea7
New Crowdin updates (#3316)
arnaud4d Jun 2, 2026
09c4919
fix: missing type in syntax for language legacy commands (#3317)
e-marchand Jun 2, 2026
21498a8
collectionclass.md Japanese (#3318)
arnaud4d Jun 3, 2026
1effc25
Feature/fullfill language sections 0306 (#3319)
arnaud4d Jun 3, 2026
9a93e5b
Merge branch '4d:main' into main
arnaud4d Jun 3, 2026
5d5d9b8
Feature/exit code (#3321)
arnaud4d Jun 4, 2026
3ba8a32
New Crowdin updates (#3320)
arnaud4d Jun 4, 2026
8bca488
fix accumulate and desc order 1
arnaud4d Jun 4, 2026
731fdb1
Feature/fullfill language sections (#3322)
arnaud4d Jun 4, 2026
4938a64
Refine `defer` command documentation for clarity (#3323)
sandritica Jun 5, 2026
948c7f7
deferred formulas command
arnaud4d Jun 5, 2026
e781702
chore(i18n): propagate translations from 948c7f745961f
arnaud4d Jun 5, 2026
002a250
chore(i18n): add translations for deferred-formulas.md (fr, es, ja, pt)
arnaud4d Jun 5, 2026
6ae7aa4
Update trigger-event.md
arnaud4d Jun 5, 2026
3336ccb
fix accumulate syntax
arnaud4d Jun 5, 2026
3d280bd
New Crowdin updates (#3324)
arnaud4d Jun 5, 2026
cd0c49b
fix form get names syntax
arnaud4d Jun 5, 2026
f56e303
fix vector order by
arnaud4d Jun 5, 2026
0759135
Feature/wp hierarchical style sheets interface (#3325)
mouna-elmaazouzi Jun 5, 2026
7d0ad07
New Crowdin updates (#3326)
arnaud4d Jun 8, 2026
7aa166b
fixed links
arnaud4d Jun 8, 2026
a899af4
New Crowdin updates (#3327)
arnaud4d Jun 8, 2026
587e4f2
Merge branch 'main' into main
arnaud4d Jun 8, 2026
daa5da5
Feature/rest server quota (#3328)
arnaud4d Jun 9, 2026
cb0e074
New Crowdin updates (#3329)
arnaud4d Jun 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions docs/API/DataClassClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ In this case, the *value* parameter must be a **comparison vector object** conta
|Property|Type|Description|
|---|---|---|
|vector|[4D.Vector](../API/VectorClass.md)|Mandatory. The vector to be compared|
|metric|Text|Optional. [Vector computation](../API/VectorClass.md#understanding-the-different-vector-computations) to use for the query. You can use one of the following (Text) constants:<li>`mk cosine` (default if omitted): calculates the cosine similarity between vectors.</li><li>`mk dot`: calculates the dot similarity of vectors.</li><li>`mk euclidean`: calculates the Euclidean distance between vectors.|
|metric|Text|Optional. [Vector computation](../API/VectorClass.md#understanding-the-different-vector-computations) to use for the query. You can use one of the following (Text) constants:<li>`mk cosine` (default if omitted): calculates the [cosine similarity](./VectorClass.md#cosinesimilarity) between vectors.</li><li>`mk dot`: calculates the [dot similarity](VectorClass.md#dotsimilarity) of vectors.</li><li>`mk euclidean`: calculates the [Euclidean distance](./VectorClass.md#euclideandistance) between vectors.|
|threshold|Real|Optional (default: 0.5). A threshold value used to filter vector comparisons based on their cosine, dot or euclidean similarity score according to the selected "metric". It is highly recommended to choose a similarity that best fits your specific use case for optimal results.|

Only a subset of **comparator** symbols are supported. Note that they compare results to the threshold value:
Expand All @@ -1236,29 +1236,32 @@ For example, you want to return entities of MyClass where the similarity with a
```4d
var $myVector : 4D.Vector
$myVector := getVector //method to get a vector, e.g. from 4D.AIKit
var $comparisonVector := {vector: $myVector; metric: mk euclidean; threshold: 1.2}
var $comparisonVector := {vector: $myVector; metric: mk cosine; threshold: 1.2}
var $results := ds.MyClass.query("myVectorField <= :1"; $comparisonVector)
```

The **order by** statement is supported in the query string so that entities in the resulting entity selection are sorted by similarity. For example:

```4d
var $results := ds.MyClass.query("myVectorField > :1 order by myVectorField desc"; $comparisonVector)
//the first entity is the most similar
//$results.first() entity is the most similar
```

:::note

The default order is ascending, although a descending order is usually the most useful for vector similarity queries. Thus, you will usually have to add the `desc` keyword in your vector similarity query strings.
You will generally want vector similarity query results to be sorted from "most similar" to "least similar." By default, results returned with an **order by** clause are sorted in ascending order. Depending on the similarity metric used, you may need to adjust the sorting direction to obtain the correct ranking:
- for [**cosine**](./VectorClass.md#cosinesimilarity) and [**dot**](./VectorClass.md#dotsimilarity) similarity, higher values indicate greater similarity. Therefore, you will typically need to include the `desc` keyword in the query string.
- for [**euclidean distance**](./VectorClass.md#euclideandistance) similarity, lower values indicate greater similarity. In this case, the default ascending order (or explicitly using the `asc` keyword) is appropriate.

:::


If the same vector appears multiple times in the query string, the order by will be applied to the results of the first one, for example:
You can only order on a single vector field. If the same vector appears multiple times in the query string, the order by will be applied to the results of the first one, for example:

```4d
var $results := ds.MyClass.query("myVectorField > :1 and myVectorField > :2 order by myVectorField desc"; /
{vector : $myVector1 };{vector : $myVector2 }) //myVectorField > :1 is used for the order by
{vector : $myVector1 };{vector : $myVector2 })
//myVectorField > :1 is used for the order by
```

See [more examples below](#example-4-2) (examples 4 and 5).
Expand All @@ -1267,6 +1270,7 @@ See [more examples below](#example-4-2) (examples 4 and 5).
:::tip Related blog posts

- [4D AI: Searching Entities by Vector Similarity in 4D](https://blog.4d.com/4d-ai-searching-entities-by-vector-similarity-in-4d)
- [4D AI: Sorting Query Results by Vector Similarity](https://blog.4d.com/4d-ai-sorting-query-results-by-vector-similarity/)
- [Why Your Search Stack Feels Broken — and How Vector Search Fixes It](https://blog.4d.com/why-your-search-stack-feels-broken-and-how-vector-search-fixes-it)

:::
Expand Down Expand Up @@ -1635,12 +1639,16 @@ var $result:=$client.embeddings.create("my long text to search"; "text-embedding
var $vector:=$result.vector

//embedding attribute is based upon a 4D field storing 4D.Vector class objects

//search with default metric (cosine)
var $employees:=ds.Employee.query("embedding > :1"; {vector : $vector})
var $employees:=ds.Employee.query("embedding > :1 order by embedding desc"; {vector : $vector})

//search with euclidean metric
var $employees:=ds.Employee.query("embedding > :1"; {vector: $vector; metric: mk euclidean})
var $employees:=ds.Employee.query("embedding < :1 order by embedding"; {vector: $vector; metric: mk euclidean})

//search with explicit cosine metric and custom threshold
var $employees:=ds.Employee.query("embedding > :1"; {vector: $vector; metric: mk cosine; threshold: 0.9})
var $employees:=ds.Employee.query("embedding > :1 order by embedding desc"; {vector: $vector; metric: mk cosine; threshold: 0.9})

//search with a formula
var $employees:=ds.Employee.query(Formula(This.embdedding.cosineSimilarity($vector)>0.9))

Expand All @@ -1649,19 +1657,15 @@ var $employees:=ds.Employee.query(Formula(This.embdedding.cosineSimilarity($vect

#### Example 5

We want to execute a query by vector similarity using vectors with different metrics and order the results by cosine similarity:
Vector-based semantic ordering can be combined with traditional ORDA filters in the same query.

```4d
//Create the comparison vectors
var $vector1Comparison:={vector: $myvector; metric: mk cosine; threshold: 0.4}
var $vector2Comparison:={vector: $myvector; metric: mk euclidean; threshold:1}

//embedding attribute is based upon a 4D field storing 4D.Vector class objects
ds.VectorTable.query("embedding>:1 and embedding<:2";$vector1Comparison;$vector2Comparison)\
.orderByFormula(Formula(This.embedding.cosineSimilarity($vector1Comparison)))

```4d
var $comparisonVector := {vector: $myVector; metric: mk cosine; threshold: 0.4}
var $results := ds.MyTable.query("myVectorField <= :1 AND salary>100000 order by myVectorField, salary desc"; $comparisonVector)
```


#### See also

[`.query()`](EntitySelectionClass.md#query) for entity selections
Expand Down
148 changes: 148 additions & 0 deletions docs/API/QuotaManagerClass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
id: QuotaManagerClass
title: QuotaManager
---


The `4D.QuotaManager` class provides you with an interface to configure and monitor some usage limits you apply to your 4D application. Thresholds are useful for example to protect the server from poorly optimized requests or excessive use of server resources. Typically, the quota manager allows you to provide thresholds to ORDA resources a REST server session can access.


`4D.QuotaManager` objects can be instantiated by the [`quotas` property of a session](./SessionClass.md#quotas) object.


<details><summary>History</summary>

|Release|Changes|
|---|---|
|21 R4|Class added|

</details>



### QuotaManager Object


4D.QuotaManager objects provide the following properties:

||
|---|
|[<!-- INCLUDE #QuotaManagerClass.currentValues.Syntax -->](#currentvalues)<br/><!-- INCLUDE #QuotaManagerClass.defaultcurrentValuesEntitySetTimeout.Summary -->|
|[<!-- INCLUDE #QuotaManagerClass.defaultEntitySetTimeout.Syntax -->](#defaultentitysettimeout)<br/><!-- INCLUDE #QuotaManagerClass.defaultEntitySetTimeout.Summary -->|
|[<!-- INCLUDE #QuotaManagerClass.maxEntitySetTimeout.Syntax -->](#maxentitysettimeout)<br/><!-- INCLUDE #QuotaManagerClass.maxEntitySetTimeout.Summary -->|
|[<!-- INCLUDE #QuotaManagerClass.nbEntitySets.Syntax -->](#nbentitysets)<br/><!-- INCLUDE #QuotaManagerClass.nbEntitySets().Summary -->|



<!-- REF QuotaManagerClass.currentValues.Desc -->
## .currentValues

<!-- REF #QuotaManagerClass.currentValues.Syntax -->**currentValues** : Object<!-- END REF -->

#### Description

The `.currentValues` property contains <!-- REF #QuotaManagerClass.currentValues.Summary -->the current values related to the defined quotas properties<!-- END REF -->. This object is automatically updated by the server.


<!-- END REF -->


<!-- REF QuotaManagerClass.defaultEntitySetTimeout.Desc -->
## .defaultEntitySetTimeout

<!-- REF #QuotaManagerClass.defaultEntitySetTimeout.Syntax -->**defaultEntitySetTimeout** : Integer<!-- END REF -->

#### Description

The `.defaultEntitySetTimeout` property contains <!-- REF #QuotaManagerClass.defaultEntitySetTimeout.Summary -->the default inactivity timeout for REST entity sets stored in memory during the current session (in seconds)<!-- END REF -->.

By default, this value is 2 hours (7200 seconds). It can also be defined at the entity set creation using the [`$timeout` REST API](../REST/$timeout.md).

You can change this value dynamically using the [`quotas.defaultEntitySetTimeout` property of the Session](./SessionClass.md#quotas), so that it will be used for any entity set created afterwards in the session (existing entity set default timeout values are not modified).

:::note

If you define a value higher than the `maxEntitySetTimeout` property value, it will be aligned with the `maxEntitySetTimeout` value.

:::

You cannot pass a value <=0 (an error is generated in this case). To reset the property value for the session, pass *undefined*.


#### Example

In some 4D code in a REST process:

```4d
Session.quotas.defaultEntitySetTimeout:=1200
```


<!-- END REF -->


<!-- REF QuotaManagerClass.maxEntitySetTimeout.Desc -->
## .maxEntitySetTimeout

<!-- REF #QuotaManagerClass.maxEntitySetTimeout.Syntax -->**maxEntitySetTimeout** : Integer<!-- END REF -->

#### Description

The `.maxEntitySetTimeout` property contains <!-- REF #QuotaManagerClass.maxEntitySetTimeout.Summary -->the maximum inactivity timeout value for REST entity sets stored in memory during the current session (in seconds)<!-- END REF -->.

You can set this value using the [`quotas.maxEntitySetTimeout` property of the Session](./SessionClass.md#quotas), so that it will be used for any entity set created afterward in the session (existing entity set maximum timeout values are not modified).

Once the `.maxEntitySetTimeout` property is set, any entity set created afterward in the session could not have a timeout value longer than the `.maxEntitySetTimeout` value.

For example, assuming the maximum inactivity timeout is set to 40 minutes (2400 seconds), if an entity set is created with a required timeout which exceeds the maximum value:

```
http://127.0.0.1/rest/People?$filter=ID>=4&$method=entityset&$timeout=3000
```

... then the timeout defined in the request is ignored and the entity set will be released after 40 minutes if not used during this period of time.

You cannot pass a value <=0 (an error is generated in this case). To reset the property value for the session, pass *undefined*.

#### Example

In some 4D code in a REST process:

```4d
Session.quotas.maxEntitySetTimeout:=2400
```


<!-- END REF -->


<!-- REF QuotaManagerClass.nbEntitySets.Desc -->
## .nbEntitySets

<!-- REF #QuotaManagerClass.nbEntitySets.Syntax -->**nbEntitySets** : Integer<!-- END REF -->

#### Description

The `.nbEntitySets` property contains <!-- REF #QuotaManagerClass.nbEntitySets.Summary -->the maximum number of REST entity sets allowed in memory for the current session (in seconds)<!-- END REF -->.

By default, there is no limit for entity sets [stored in memory by REST requests](../REST/$info.md) (the value is 0). You can set a limit to control the server payload for a specific session.

When the maximum number of allowed entity sets is reached, a REST request that need to create an entity set will get a [**429** HTTP status code and an error response](../REST/REST_requests.md#rest-status-and-response), until at least one entity set is released. You can release an entity set from the cache using the [`$release` REST command](../REST/$entityset.md#entitysetrelease).

You cannot pass a value <=0 (an error is generated in this case). To reset the property value for the session, pass *undefined*.


#### Example

In some 4D code in a REST process:

```4d
//max 50 entity sets
Session.quotas.nbEntitySets:=50
```

<!-- END REF -->




58 changes: 58 additions & 0 deletions docs/API/SessionClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ All session types can handle privileges, but only the code executed in a **web c
|[<!-- INCLUDE #SessionClass.info.Syntax -->](#info)<br/><!-- INCLUDE #SessionClass.info.Summary -->|
|[<!-- INCLUDE #SessionClass.isGuest().Syntax -->](#isguest)<br/><!-- INCLUDE #SessionClass.isGuest().Summary -->|
|[<!-- INCLUDE #SessionClass.promote().Syntax -->](#promote)<br/><!-- INCLUDE #SessionClass.promote().Summary -->|
|[<!-- INCLUDE #SessionClass.quotas.Syntax -->](#quotas)<br/><!-- INCLUDE #SessionClass.quotas.Summary -->|
|[<!-- INCLUDE #SessionClass.restore().Syntax -->](#restore)<br/><!-- INCLUDE #SessionClass.restore().Summary -->|
|[<!-- INCLUDE #SessionClass.setPrivileges().Syntax -->](#setprivileges)<br/><!-- INCLUDE #SessionClass.setPrivileges().Summary -->|
|[<!-- INCLUDE #SessionClass.storage.Syntax -->](#storage)<br/><!-- INCLUDE #SessionClass.storage.Summary -->|
Expand Down Expand Up @@ -571,6 +572,8 @@ Since `.info` is a computed property, it is recommended to call it once and then

:::

This property is **read only**.


<!-- END REF -->

Expand Down Expand Up @@ -718,6 +721,61 @@ End if
<!-- END REF -->


<!-- REF SessionClass.quotas.Desc -->
## .quotas

<details><summary>History</summary>

|Release|Changes|
|---|---|
|21 R4|Added|

</details>

<!-- REF #SessionClass.quotas.Syntax -->**.quotas** : 4D.QuotaManager<!-- END REF -->

#### Description


The `.quotas` property contains <!-- REF #SessionClass.quotas.Summary -->a `4D.QuotaManager` object with current values and set values for server thresholds in the current session<!-- END REF -->. Server thresholds are used to control the requests to the server and help preventing excessive use of resources (see [`4D.QuotaManager` class](./QuotaManagerClass.md)).

This property is **read only**.

The following properties of the `4D.QuotaManager` object are available for the session:

|Property||Type|Writable|Description|
|---|---|---|---|---|
|[nbEntitySets](./QuotaManagerClass.md#nbentitysets)||Integer|yes|Maximum allowed number of entity sets in server's memory|
|[defaultEntitySetTimeout](./QuotaManagerClass.md#defaultentitysettimeout) ||Integer|yes|Default inactivity timeout for entity sets in memory (seconds)|
|[maxEntitySetTimeout](./QuotaManagerClass.md#maxentitysettimeout) ||Integer|yes|Maximum inactivity timeout for entity sets in memory (seconds)|
|currentValues||Object|no||
||nbEntitySets|Integer|no|Number of entity sets currently in memory|

When you modify a value, it is immediately taken into account by the server (no need to restart) and will be applied to further REST requests.

:::tip Related blog post

[Make your REST server at the top of its game ... Forget throttling or crashing and tune yourself the memory usage](https://blog.4d.com/make-your-rest-server-at-the-top-of-its-game-forget-throttling-or-crashing-and-tune-yourself-the-memory-usage).

:::

#### Example

```4d
//set the maximum number of entity sets in memory
//for the session to 50
Session.quotas.nbEntitySets:=50
```

<!-- END REF -->


#### See also

[QuotaManager class](./QuotaManagerClass.md)



<!-- REF SessionClass.restore().Desc -->
## .restore()

Expand Down
2 changes: 1 addition & 1 deletion docs/Concepts/classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ You want to list 4D built-in classes:

## Class object

When a class is [defined](#class-definition) in the project, it is loaded in the 4D language environment. A class is an object itself, of ["Class" class](API/ClassClass.md). A class object has the following properties and function:
When a class is [defined](../Project/code-overview.md#creating-classes) in the project, it is loaded in the 4D language environment. A class is an object itself, of ["Class" class](API/ClassClass.md). A class object has the following properties and function:

- [`name`](API/ClassClass.md#name) string
- [`superclass`](API/ClassClass.md#superclass) object (null if none)
Expand Down
8 changes: 8 additions & 0 deletions docs/Concepts/flow-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ The expression is TRUE only if both methods are TRUE. However, even if _MethodA_
End if
```

However, the most elegant solution is then to use the [`&&` short-circuit operator](./operators.md#short-circuit-and-operator-) and to write:

```4d
If (MethodA && MethodB)
...
End if
```

The result is similar and _MethodB_ is evaluated only if necessary.

> **Note:** The [ternary operator](operators.md#ternary-operator) allows writing one-line conditional expressions and can replace a full sequence of If..Else statements.
Expand Down
11 changes: 9 additions & 2 deletions docs/Notes/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ Read [**What’s new in 4D 21 R4**](https://blog.4d.com/whats-new-in-4d-21-r4/),

#### Highlights

- New [`defer`](../commands/defer) command to declare some code to be always executed at method or function exit.
- Multi-level list style sheets are now [supported in 4D Write Pro Interface](../WritePro/writeprointerface.md#multi-level-style-sheets), allowing users to create and manage structured multi-level lists directly from the toolbar and sidebar.
- New [`defer`](../commands/defer) command to declare some code to be always executed at method or function exit; new [`Deferred formulas`](../commands/deferred-formulas) command to get the list of deferred formulas.
- New session `.quotas` property to configure thresholds for sessions.
- New [`4D.QuotaManager`](../API/QuotaManagerClass.md) class to handle threshold objects for protecting the server.
- New [`$entityset/$release`](../REST/$entityset.md#entitysetrelease) REST request to delete entity sets from server cache.

#### Behavior changes

- The **`GET /Employee/$entityset/<entitySetID>?$method=release`** REST syntax is **deprecated** and should no longer be used. To delete entity sets, you must now use [`/$entityset/$release` with a POST verb](./$entityset.md).


## 4D 21 R3
Expand All @@ -20,7 +27,7 @@ Read [**What’s new in 4D 21 R3**](https://blog.4d.com/whats-new-in-4d-21-r3/),
#### Highlights

- The [`JSON Validate`](../commands/json-validate) command now supports of JSON Schema draft 2020-12.
- 4D Write Pro now supports [hierarchical list style sheets](../WritePro/user-legacy/stylesheets.md#hierarchical-list-style-sheets), enabling the creation and management of structured [multi-level lists](../WritePro/user-legacy/using-a-4d-write-pro-area.md#multi-level-lists) with automatic numbering.
- 4D Write Pro now supports [multi-level list style sheets](../WritePro/user-legacy/stylesheets.md#multi-level-list-style-sheets), enabling the creation and management of structured [multi-level lists](../WritePro/user-legacy/using-a-4d-write-pro-area.md#multi-level-lists) with automatic numbering.
- Ability to use a custom certificate from the macOS keychain instead of a local certificates folder in [`HTTPRequest`](../API/HTTPRequestClass.md#4dhttprequestnew) and [`HTTPAgent`](../API/HTTPAgentClass.md#4dhttpagentnew) classes.
- New [`4D.Method` class](../API/MethodClass.md) to create and execute a 4D method code from text source. [`METHOD Get path`](../commands/method-get-path) and [`METHOD RESOLVE PATH`](../commands/method-resolve-path) commands support a new `path volatile method` constant (128).
- IMAP transporter now supports mailbox event notifications using the IDLE protocol through a [notifier object](../API/IMAPTransporterClass.md#notifier) of the [4D.IMAPNotifier](../API/IMAPNotifierClass.md) class, configurable via the `listener` property of [IMAP New transporter](../commands/imap-new-transporter).
Expand Down
Loading
Loading