meilisearch @ v1.57.0
integrity
- size
- 20.4 MiB
- downloaded
- last checked
release notes
🌈 Improvements
View the target state of dynamic search rules
[!NOTE]
Using this feature requires the Enterprise Edition. Enterprise Edition features are also available on Meilisearch Cloud.
Allows seeing the state of dynamic search rules (DSR) as if all pending DSR update tasks had been processed.
A "pending" task is a task that is either enqueued or currently processing.
Route to see the target state of a selected rule
The new GET /dynamic-search-rules/{:ruleUid}/target route returns the "target" state of the DSR, that is, an object with the following fields:
current, dynamic search rule object ornull: the current values of the dynamic search rules, ornullif the dynamic search rule doesn't exist yettarget, dynamic search rule object ornull: the field of the dynamic search rules that will be modified by currently pending tasks, ornullif the dynamic search rule will be deleted after all pending tasks have been processedneedsProcessing, boolean,trueif at least one pending task pertaining to this dynamic search rule existstaskUids, array of task uids, list of the pending tasks pertaining to the dynamic search rule
New body parameter to see the target state of all rules
The existing POST /dynamic-search-rules route used to list the dynamic search rules has a new showTarget parameter, an optional boolean. When present and true, showTarget modifies the response in the following way:
- new global fields in the response:
needsProcessing: boolean,trueif at least one DSR update task existstaskUids, array of task uids, list of the pending DSR update taskstotalRuleCount, number, current total number of rules regardless of the filter. This field is different fromtotalin thattotalindicates the total number of rules matching the optional filter passed in the body parameters ofPOST /dynamic-search-rulestargetTotalRuleCount, number, total number of rules that will exist after processing all pending DSR update tasks
- each rule returned in results has an additional
needsProcessingboolean set totrueif at least one pending DSR update task applies to this rule.
Examples
Creating a new rule and checking its target state
// PATCH /dynamic-search-rules/scale-rule
{
"conditions": {
"query": {
"words": "HERO SUPER"
}
},
"actions": {
"scale": [
{
"ids": ["372631"],
"weight": 2.0
}
]
}
}
// GET /dynamic-search-rules/scale-rule/target
// response
{
"current": null, // rule did not previously exist
"needsProcessing": true, // rule needs processing
"target": { // target state matches the update
"actions": {
"scale": [
{
"ids": ["372631"],
"weight": 2.0
}
]
},
"active": true,
"conditions": {
"query": {
"words": "HERO SUPER"
}
}
},
"taskUids": [6] // id of the task that will create the rule
}
// POST /dynamic-search-rules
// request body
{
"showTarget": true
}
// response
{
"results": [
{
"actions": {},
"active": true,
"conditions": {
"time": {
"end": "2032-12-31T09:50:12Z",
"start": "2023-01-01T09:50:12Z"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false, // existing rule doesn't need processing
"uid": "skips-action-without-selector-id"
},
{
"actions": {
"pin": [
{
"position": 0,
"id": "15242",
"indexUid": "movies"
}
]
},
"active": true,
"conditions": {
"query": {
"words": "super hero"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false, // existing rule doesn't need processing
"uid": "existing-rule-to-migrate"
}
],
"limit": 20,
"offset": 0,
"total": 2, // this might be lower depending on current filter
"needsProcessing": true, // some task needs processing
"totalRuleCount": 2, // always represents all existing rules
"targetTotalRuleCount": 3, // one more because one rule is pending creation
"taskUids": [6] // task that will create the rule
}
// GET /dynamic-search-rules/scale-rule/target
// response
{
"current": {
"actions": {
"scale": [
{
"ids": [
"372631"
],
"weight": 2.0
}
]
},
"active": true,
"conditions": {
"query": {
"words": "HERO SUPER"
}
}
},
"target": {}, // no further change pending
"taskUids": [],
"needsProcessing": false
}
// POST /dynamic-search-rules
// request body
{
"showTarget": true
}
// response
{
"limit": 20,
"offset": 0,
"results": [
{
"actions": {
"pin": [
{
"position": 0,
"id": "15242",
"indexUid": "movies"
}
]
},
"active": true,
"conditions": {
"query": {
"words": "super hero"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false,
"uid": "existing-rule-to-migrate"
},
{
"actions": {
"scale": [
{
"ids": ["372631"],
"weight": 2.0
}
]
},
"active": true,
"conditions": {
"query": {
"words": "HERO SUPER"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false,
"uid": "scale-rule"
},
{
"actions": {},
"active": true,
"conditions": {
"time": {
"end": "2032-12-31T09:50:12Z",
"start": "2023-01-01T09:50:12Z"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false,
"uid": "skips-action-without-selector-id"
}
],
"total": 3,
"totalRuleCount": 3,
"targetTotalRuleCount": 3, // agrees with totalRuleCount
"needsProcessing": false, // target state has been reached
"taskUids": [] // always empty when no processing needed
}
Updating an existing rule
// PATCH /dynamic-search-rules/existing-rule-to-migrate
// request body
{
"conditions": {
"query": {
"words": "SUPER hero"
}
}
}
// GET /dynamic-search-rules/existing-rule-to-migrate/target
// response
{
"current": { // rule already exists
"actions": {
"pin": [
{
"id": "15242",
"indexUid": "movies",
"position": 0
}
]
},
"active": true,
"conditions": {
"query": {
"words": "super hero"
}
}
},
"needsProcessing": true,
"target": {
"conditions": {
"query": {
"words": "SUPER hero" // only modified values appear in target
}
}
},
"taskUids": [7] // id of the task that will update the rule
}
// POST /dynamic-search-rules
// request body
{
"showTarget": true
}
// response
{
"results": [
{
"actions": {
"pin": [
{
"position": 0,
"id": "15242",
"indexUid": "movies"
}
]
},
"active": true,
"conditions": {
"query": {
"words": "super hero" // still indicates the current value, check the details GET target route to get the details
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": true, // this task will be updated
"uid": "existing-rule-to-migrate"
},
{
"actions": {
"scale": [
{
"ids": ["372631"],
"weight": 2.0
}
]
},
"active": true,
"conditions": {
"query": {
"words": "HERO SUPER"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false,
"uid": "scale-rule"
},
{
"actions": {},
"active": true,
"conditions": {
"time": {
"end": "2032-12-31T09:50:12Z",
"start": "2023-01-01T09:50:12Z"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false,
"uid": "skips-action-without-selector-id"
}
],
"limit": 20,
"offset": 0,
"total": 3,
"totalRuleCount": 3,
"targetTotalRuleCount": 3, // agrees with totalRuleCount
"needsProcessing": true, // at least one rule will be updated
"taskUids": [7] // id of the task that will update any DSR
}
// GET /dynamic-search-rules/existing-rule-to-migrate/target
// response
{
"current": {
"actions": {
"scale": [
{
"ids": [
"372631"
],
"weight": 2.0
}
]
},
"active": true,
"conditions": {
"query": {
"words": "HERO SUPER"
}
}
},
"target": {}, // no change
"taskUids": [], // no task remaining to update the rule
"needsProcessing": false // no processing remaining for this rule
}
// POST /dynamic-search-rules
// request body
{
"showTarget": true
}
// response
{
"results": [
{
"actions": {
"pin": [
{
"position": 0,
"id": "15242",
"indexUid": "movies"
}
]
},
"active": true,
"conditions": {
"query": {
"words": "SUPER hero" // indicates the modified value
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false, // already updated
"uid": "existing-rule-to-migrate"
},
{
"actions": {
"scale": [
{
"ids": ["372631"],
"weight": 2.0
}
]
},
"active": true,
"conditions": {
"query": {
"words": "HERO SUPER"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false,
"uid": "scale-rule"
},
{
"actions": {},
"active": true,
"conditions": {
"time": {
"end": "2032-12-31T09:50:12Z",
"start": "2023-01-01T09:50:12Z"
}
},
"lastUpdatedAt": "[lastUpdatedAt]",
"needsProcessing": false,
"uid": "skips-action-without-selector-id"
}
],
"limit": 20,
"offset": 0,
"total": 3,
"totalRuleCount": 3,
"targetTotalRuleCount": 3, // agrees with totalRuleCount
"needsProcessing": false, // no pending update
"taskUids": [] // empty list of tasks
}
By @dureuill in https://github.com/meilisearch/meilisearch/pull/6715
🦋 Fixes
Fix relevancy issue in federated search
Fixes a v1.54 regression in federated search where interleaving relevancy and sort rules would skip every other rule. For instance, a sort ranking rule could be skipped if placed after a relevancy rule.
By @dureuill in https://github.com/meilisearch/meilisearch/pull/6731
Fix Apple Silicon binary generation
Upgrade macos runner following removal by GH
By @dureuill in https://github.com/meilisearch/meilisearch/pull/6734
🔩 Miscellaneous
- Fix version comment of the pinned Homebrew bump action by @curquiza in https://github.com/meilisearch/meilisearch/pull/6718
Full Changelog: https://github.com/meilisearch/meilisearch/compare/v1.56.2...v1.57.0
download
curl -fL -o v1.57.0.zip https://ratatoskr.space/pkg/meilisearch/v1.57.0.zip
printf '%s %s\n' 'e54df734050a4b4a15bc255a6433d81773425cf537018b1931390bfbedfd1251' 'v1.57.0.zip' | sha256sum -c -
$url = "https://ratatoskr.space/pkg/meilisearch/v1.57.0.zip"
$out = "v1.57.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "e54df734050a4b4a15bc255a6433d81773425cf537018b1931390bfbedfd1251") { throw "sha256 mismatch" }
curl -fL -o v1.57.0.tar.gz https://ratatoskr.space/pkg/meilisearch/v1.57.0.tar.gz
printf '%s %s\n' 'fbe41eb8b2caab6d506e969ee89c9d7ce8da41894d48d7377cc930683e5173c4' 'v1.57.0.tar.gz' | sha256sum -c -
$url = "https://ratatoskr.space/pkg/meilisearch/v1.57.0.tar.gz"
$out = "v1.57.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "fbe41eb8b2caab6d506e969ee89c9d7ce8da41894d48d7377cc930683e5173c4") { throw "sha256 mismatch" }
download via yggdrasil mesh
curl -fL -o v1.57.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.57.0.zip
printf '%s %s\n' 'e54df734050a4b4a15bc255a6433d81773425cf537018b1931390bfbedfd1251' 'v1.57.0.zip' | sha256sum -c -
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.57.0.zip"
$out = "v1.57.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "e54df734050a4b4a15bc255a6433d81773425cf537018b1931390bfbedfd1251") { throw "sha256 mismatch" }
curl -fL -o v1.57.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.57.0.tar.gz
printf '%s %s\n' 'fbe41eb8b2caab6d506e969ee89c9d7ce8da41894d48d7377cc930683e5173c4' 'v1.57.0.tar.gz' | sha256sum -c -
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.57.0.tar.gz"
$out = "v1.57.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "fbe41eb8b2caab6d506e969ee89c9d7ce8da41894d48d7377cc930683e5173c4") { throw "sha256 mismatch" }
| artifact | format | size | hashes |
|---|---|---|---|
| v1.57.0.zip | zip | 20.4 MiB |
blake3-24 1e429d9ff61f045c827d499f0884523c789726ea1fd31a0d
sha256 e54df734050a4b4a15bc255a6433d81773425cf537018b1931390bfbedfd1251
sha1 916befda5f6757327f936883895f6e55bac2471a
|
| v1.57.0.tar.gz | tar.gz | 19.4 MiB |
blake3-24 4cc2e551c0eeefc3210f26af6f0434a4b5f2f69f6a3d81d9
sha256 fbe41eb8b2caab6d506e969ee89c9d7ce8da41894d48d7377cc930683e5173c4
sha1 e121d819dc70d270af7717ff6b0706790e4d1420
|
install
http_archive(
name = "meilisearch",
urls = ["https://ratatoskr.space/pkg/meilisearch/v1.57.0.tar.gz"],
integrity = "sha256-++QeuLLKq21Qbpae6JydfOjaQYlNSNc3fMkwaD5Rc8Q=",
strip_prefix = "meilisearch-v1.57.0",
)
.url = "https://ratatoskr.space/pkg/meilisearch/v1.57.0.tar.gz",
install via yggdrasil mesh
http_archive(
name = "meilisearch",
urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.57.0.tar.gz"],
integrity = "sha256-++QeuLLKq21Qbpae6JydfOjaQYlNSNc3fMkwaD5Rc8Q=",
strip_prefix = "meilisearch-v1.57.0",
)
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.57.0.tar.gz",