yggvault ratatoskr-space connected via regular web
Color theme
also available via yggdrasil mesh http://[203:b338:2a84:a18f:986:47ae:1a4:d8d3]/pkg/meilisearch/v1.42.0
vault / meilisearch / v1.42.0

meilisearch @ v1.42.0

integrity

size
20.3 MiB
downloaded
last checked
source https://github.com/meilisearch/meilisearch · available · github

release notes

✨ Enhancement

Support search fallback on remote unavailability

By @Kerollmops in https://github.com/meilisearch/meilisearch/pull/6306

We introduce a new fallback system for the sharding and replication enterprise edition feature, along with a way to determine which remote is available. The engine can avoid machines that are unavailable for a period and resume querying them once they're back online.

The following snippet shows what the /network route looks like now that this PR exposes the remote statuses/availabilities.

"remotes": {
	"prod2": {
	  "url": "http://localhost:7702",
	  "searchApiKey": "mykey",
	  "writeApiKey": "mykey",
	  "status": "available"
	},
	"prod3": {
	  "url": "http://localhost:7703",
	  "searchApiKey": "mykey",
	  "writeApiKey": "mykey",
	  "status": "unavailable"
	}
}

🔬 Experimental: Document join Filtering

By @ManyTheFish in https://github.com/meilisearch/meilisearch/pull/6314

This enhancement extends the Cross-index document hydration introduced in v1.39.0 by allowing the user to filter on the foreign indexes to retrieve the documents.

📓 Note: This implementation doesn't support a remote sharding environment

foreignKeys experimental feature

TheforeignKeys experimental feature must be activated to use the foreign filters:

curl -X PATCH 'http://127.0.0.1:7700/experimental-features' \
  -H 'Content-Type: application/json' \
  --data-binary '{"foreignKeys": true}'

foreignKeys + filter index setting

To be able to use the foreign filters, the related field must be set as a foreignKey and as a filterableAttribute in /indexes/{index_uid}/settings:

{
	// new setting, an array of foreign keys that allows multiple foreign relationships between indexes
	"foreignKeys":  [
		{
			// the path in the JSON document containing foreign document ids
			"fieldName": "actors",
			
			// the UID of the foreign index containing the documents to fetch during hydration
	        "foreignIndexUid": "actors"
		}
	],
	// the actors field must be filterable on equality
	"filterableAttributes": [
		{
	    	"attributePatterns": ["actors"],
	     	"features": {
				"facetSearch": false,
				"filter": {
					"equality": true,
					"comparison": false
				}
			}
		}
	]
}

filtering using the _foreign filter

On the search route, a new _foreign verb has been introduced and should be used as follows:

{
	"q": "<query>",

	// filters on the movie index:
	// genres = action
    // AND
    // the foreign documents from the actor index match:  birthday STARTS WITH \"1958-\" AND popularity >= 3.5
	"filter": "genres = action AND _foreign(actors, birthday STARTS WITH \"1958-\" AND popularity >= 3.5)"
}

Note: nesting foreign filters is not supported and will return an error

Example of usage

Prerequisites

Step 1: Enable Foreign Keys Feature

curl -X PATCH 'http://127.0.0.1:7700/experimental-features' \
  -H 'Content-Type: application/json' \
  --data-binary '{"foreignKeys": true}'

Step 2: Create Indexes

Create the actors index
curl -X POST 'http://127.0.0.1:7700/indexes' \
  -H 'Content-Type: application/json' \
  --data-binary '{"uid": "actors", "primaryKey": "id"}'
Create the movies index
curl -X POST 'http://127.0.0.1:7700/indexes' \
  -H 'Content-Type: application/json' \
  --data-binary '{"uid": "movies", "primaryKey": "id"}'

Step 3: Add Documents to the actors Index

curl -X POST 'http://127.0.0.1:7700/indexes/actors/documents' \
  -H 'Content-Type: application/json' \
  --data-binary '[
  {"id": 1, "name": "Tom", "familyName": "Hanks", "birthDate": "1956-07-09"},
  {"id": 2, "name": "Meryl", "familyName": "Streep", "birthDate": "1949-06-22"},
  {"id": 3, "name": "Leonardo", "familyName": "DiCaprio", "birthDate": "1974-11-11"},
  {"id": 4, "name": "Emma", "familyName": "Watson", "birthDate": "1990-04-15"}
]'

Step 4: Add Documents to the movies Index

curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' \
  -H 'Content-Type: application/json' \
  --data-binary '[
  {"id": 1, "title": "Forrest Gump", "description": "The presidencies of Kennedy and Johnson, the Vietnam War, the Watergate scandal and other historical events unfold from the perspective of an Alabama man with an IQ of 75.", "actors": [1]},
  {"id": 2, "title": "The Devil Wears Prada", "description": "A smart but sensible new graduate lands a job as an assistant to Miranda Priestly, the demanding editor-in-chief of a high fashion magazine.", "actors": [2, 4]},
  {"id": 3, "title": "Inception", "description": "A thief who steals corporate secrets through the use of dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O.", "actors": [3]},
  {"id": 4, "title": "Cast Away", "description": "A FedEx executive undergoes a physical and emotional transformation after crash landing on a deserted island.", "actors": [1]}
]'

Step 5: Configure Foreign Keys on the movies Index

curl -X PATCH 'http://127.0.0.1:7700/indexes/movies/settings' \
  -H 'Content-Type: application/json' \
  --data-binary '{"foreignKeys": [{"fieldName": "actors", "foreignIndexUid": "actors"}], "filterableAttributes": [{"attributePatterns": ["actors"],"features": {"facetSearch": false,"filter": {"equality": true,"comparison": false}}}]}'

Step 6: Configure filterable on the actors Index

curl -X PATCH 'http://127.0.0.1:7700/indexes/actors/settings' \
  -H 'Content-Type: application/json' \
  --data-binary '{"filterableAttributes": [{"attributePatterns": ["birthDate"],"features": {"facetSearch": false,"filter": {"equality": true,"comparison": false}}}]}'

Step 7: Perform a Federated Search

curl -X POST 'http://127.0.0.1:7700/multi-search' \
  -H 'Content-Type: application/json' \
  --data-binary '{
  "queries": [
    {
      "indexUid": "movies",
      "q": "Forrest",
      "filter": "_foreign(actors, birthDate = \"1956-07-09\")"
    }
  ],
  "federation": {
    "limit": 20,
    "offset": 0
  }
}'

Expected Result

The federated search should return movie documents with the actors array automatically hydrated with full actor objects instead of just IDs:

{
  "hits": [
    {
      "id": 1,
      "title": "Forrest Gump",
      "description": "...",
      "actors": [
        {
          "id": 1,
          "name": "Tom",
          "familyName": "Hanks",
          "birthDate": "1956-07-09"
        }
      ],
      "_federation": {
        "indexUid": "movies",
        "queriesPosition": 0,
        "weightedRankingScore": 0.9848484848484849
      }
    }
  ],
  "processingTimeMs": 208,
  "limit": 20,
  "offset": 0,
  "estimatedTotalHits": 1
}

🪲 Bug fixes

🔩 Miscellaneous

download

unix · zip
curl -fL -o v1.42.0.zip https://ratatoskr.space/pkg/meilisearch/v1.42.0.zip
                    printf '%s  %s\n' '684163a83301e6aac0b6b3b769c546b93e752d027d8d7b3f24d3d7852eb0e459' 'v1.42.0.zip' | sha256sum -c -
windows · zip
$url = "https://ratatoskr.space/pkg/meilisearch/v1.42.0.zip"
$out = "v1.42.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "684163a83301e6aac0b6b3b769c546b93e752d027d8d7b3f24d3d7852eb0e459") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1.42.0.tar.gz https://ratatoskr.space/pkg/meilisearch/v1.42.0.tar.gz
                    printf '%s  %s\n' 'ff26cfd823689397867b079005db88eacde3fd24ec59aa044db002ff07ecef34' 'v1.42.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "https://ratatoskr.space/pkg/meilisearch/v1.42.0.tar.gz"
$out = "v1.42.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "ff26cfd823689397867b079005db88eacde3fd24ec59aa044db002ff07ecef34") { throw "sha256 mismatch" }
download via yggdrasil mesh
unix · zip
curl -fL -o v1.42.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.42.0.zip
                    printf '%s  %s\n' '684163a83301e6aac0b6b3b769c546b93e752d027d8d7b3f24d3d7852eb0e459' 'v1.42.0.zip' | sha256sum -c -
windows · zip
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.42.0.zip"
$out = "v1.42.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "684163a83301e6aac0b6b3b769c546b93e752d027d8d7b3f24d3d7852eb0e459") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1.42.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.42.0.tar.gz
                    printf '%s  %s\n' 'ff26cfd823689397867b079005db88eacde3fd24ec59aa044db002ff07ecef34' 'v1.42.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.42.0.tar.gz"
$out = "v1.42.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "ff26cfd823689397867b079005db88eacde3fd24ec59aa044db002ff07ecef34") { throw "sha256 mismatch" }
artifact format size hashes
v1.42.0.zip zip 20.3 MiB
blake3-24 95c0fcd2c53d6466c24cb4a808ca003ef0632473f777fe06
sha256 684163a83301e6aac0b6b3b769c546b93e752d027d8d7b3f24d3d7852eb0e459
sha1 33ef0fbbd704f8129d30ec8b0b0651ae4ff2a5a6
v1.42.0.tar.gz tar.gz 19.3 MiB
blake3-24 c40cb28c23ed51893abc43f38c08dc11f53af42658e82dbe
sha256 ff26cfd823689397867b079005db88eacde3fd24ec59aa044db002ff07ecef34
sha1 d74050f77cb6cba6babc4c781b650e6add1f9a5d

install

bazel
http_archive(
    name = "meilisearch",
    urls = ["https://ratatoskr.space/pkg/meilisearch/v1.42.0.tar.gz"],
    integrity = "sha256-/ybP2CNok5eGeweQBduI6s3j/STsWaoETbAC/wfs7zQ=",
    strip_prefix = "meilisearch-v1.42.0",
)
zig
.url = "https://ratatoskr.space/pkg/meilisearch/v1.42.0.tar.gz",
install via yggdrasil mesh
bazel
http_archive(
    name = "meilisearch",
    urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.42.0.tar.gz"],
    integrity = "sha256-/ybP2CNok5eGeweQBduI6s3j/STsWaoETbAC/wfs7zQ=",
    strip_prefix = "meilisearch-v1.42.0",
)
zig
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/meilisearch/v1.42.0.tar.gz",
← v1.42.1v1.41.0 →