錯誤代碼
此頁面詳盡列出 Meilisearch API 錯誤。
api_key_already_exists
已存在具有此uid
的金鑰。
api_key_not_found
找不到請求的 API 金鑰。
bad_request
請求無效,請檢查錯誤訊息以取得更多資訊。
database_size_limit_reached
請求的資料庫已達到其最大大小。
document_fields_limit_reached
文件超出每個文件最大 65,535 個欄位的限制。
document_not_found
無法擷取請求的文件。它可能不存在,或是資料庫處於不一致的狀態。
dump_process_failed
在傾印建立過程中發生錯誤。任務已中止。
facet_search_disabled
當facetSearch
索引設定設定為 false
時,已查詢 /facet-search
路由。
immutable_api_key_actions
無法修改 API 金鑰的actions
欄位。
immutable_api_key_created_at
無法修改 API 金鑰的createdAt
欄位。
immutable_api_key_expires_at
API 金鑰的 expiresAt
欄位無法修改。
immutable_api_key_indexes
API 金鑰的 indexes
欄位無法修改。
immutable_api_key_key
API 金鑰的 key
欄位無法修改。
immutable_api_key_uid
API 金鑰的 uid
欄位無法修改。
immutable_api_key_updated_at
API 金鑰的 updatedAt
欄位無法修改。
immutable_index_uid
索引的 uid
欄位無法修改。
immutable_index_updated_at
索引的 updatedAt
欄位無法修改。
index_already_exists
index_creation_failed
嘗試建立索引時發生錯誤,請參考我們的索引建立指南。
index_not_found
找不到具有此 uid
的索引,請參考我們的索引建立指南。
index_primary_key_already_exists
請求的索引已具有一個無法變更的主鍵。
index_primary_key_multiple_candidates_found
主鍵推斷失敗,因為接收到的文件中包含多個以 id
結尾的欄位。請使用更新索引端點來手動設定主鍵。
internal
Meilisearch 發生內部錯誤。請檢查錯誤訊息,如有必要,請開啟一個 issue。
invalid_api_key
請求的資源受 API 金鑰保護。提供的 API 金鑰無效。請在我們的安全性教學中閱讀更多相關資訊。
invalid_api_key_actions
提供的 API 金鑰資源的 actions
欄位無效。它應該是一個代表動作名稱的字串陣列。
invalid_api_key_description
提供的 API 金鑰資源的 description
欄位無效。它應該是一個字串或設定為 null
。
invalid_api_key_expires_at
提供的 API 金鑰資源的 expiresAt
欄位無效。它應該顯示未來日期或 RFC 3339 格式的日期時間,或設定為 null
。
invalid_api_key_indexes
提供的 API 金鑰資源的 indexes
欄位無效。它應該是一個代表索引名稱的字串陣列。
invalid_api_key_limit
limit
參數無效。它應該是一個整數。
invalid_api_key_name
給定的 name
無效。它應該是一個字串或設定為 null
。
invalid_api_key_offset
offset
參數無效。它應該是一個整數。
invalid_api_key_uid
給定的 uid
無效。uid
必須遵循 uuid v4 格式。
invalid_search_attributes_to_search_on
傳遞給 attributesToSearchOn
的值無效。attributesToSearchOn
接受一個字串陣列,表示文件屬性。提供給 attributesToSearchOn
的屬性必須存在於searchableAttributes
清單中。
invalid_content_type
Meilisearch 不支援Content-Type 標頭。目前,Meilisearch 僅支援 JSON、CSV 和 NDJSON。
invalid_document_csv_delimiter
csvDelimiter
參數無效。它應該是一個字串或單個 ASCII 字元。
invalid_document_id
提供的文件識別碼不符合格式要求。文件識別碼必須是整數或字串類型,僅由字母數字字元(a-z A-Z 0-9)、連字符(-)和底線(_)組成。
invalid_document_fields
fields
參數無效。它應該是一個字串。
invalid_document_filter
如果發生以下情況,就會出現此錯誤
filter
參數無效- 對於使用 POST 端點取得文件,它應該是一個字串、字串陣列或字串陣列的陣列
- 對於使用 GET 端點取得文件,它應該是一個字串
- 用於篩選的屬性未在
filterableAttributes
清單中定義 - 篩選表達式缺少或包含無效的運算符。請閱讀更多關於我們支援的運算符
invalid_document_limit
limit
參數無效。它應該是一個整數。
invalid_document_offset
offset
參數無效。它應該是一個整數。
invalid_document_geo_field
一個或多個文件的提供的 _geo
欄位無效。Meilisearch 期望 _geo
是一個包含兩個欄位的物件,lat
和 lng
,每個欄位都包含以字串或浮點數表示的地理坐標。請在我們的專屬指南中閱讀更多關於 _geo
以及如何排除故障的資訊。
invalid_facet_search_facet_name
用於 facetName
欄位的屬性不是字串,或者未在filterableAttributes
清單中定義。
invalid_facet_search_facet_query
提供的 facetQuery
值無效。它應該是一個字串或 null
。
invalid_index_limit
limit
參數無效。它應該是一個整數。
invalid_index_offset
offset
參數無效。它應該是一個整數。
invalid_index_uid
提供的索引格式有錯誤,請參考我們的索引建立指南。
invalid_index_primary_key
primaryKey
欄位無效。它應該是一個字串或設定為 null
。
invalid_multi_search_query_federated
多重搜尋查詢包含 federationOptions
,但頂層的 federation
物件為 null
或遺失。
invalid_multi_search_query_pagination
多重搜尋查詢包含 page
、hitsPerPage
、limit
或 offset
,但頂層的 federation 物件不是 null
。
invalid_multi_search_weight
多重搜尋查詢中 federated.weight
的值為負數。
invalid_multi_search_queries_ranking_rules
多重搜尋請求中的兩個或多個查詢具有不相容的結果。
invalid_multi_search_facets
federation.facetsByIndex.<INDEX_NAME>
包含的值不在可篩選屬性清單中。
invalid_multi_search_sort_facet_values_by
federation.mergeFacets.sortFacetValuesBy
不是字串,或不具有允許的值之一。
invalid_multi_search_query_facets
當存在聯合且非 null
時,queries 陣列中的查詢包含 facets
。
invalid_multi_search_merge_facets
federation.mergeFacets
不是物件,或包含未預期的欄位。
invalid_multi_search_max_values_per_facet
federation.mergeFacets.maxValuesPerFacet
不是正整數。
invalid_multi_search_facet_order
兩個或多個索引對於同一個請求的 facet 具有不同的 faceting.sortFacetValuesBy
。
invalid_multi_search_facets_by_index
facetsByIndex
不是物件,或包含未知的欄位。
invalid_search_attributes_to_crop
attributesToCrop
參數無效。它應該是字串陣列、字串或設定為 null
。
invalid_search_attributes_to_highlight
attributesToHighlight
參數無效。它應該是字串陣列、字串或設定為 null
。
invalid_search_attributes_to_retrieve
attributesToRetrieve
參數無效。它應該是字串陣列、字串或設定為 null
。
invalid_search_crop_length
cropLength
參數無效。它應該是整數。
invalid_search_crop_marker
cropMarker
參數無效。它應該是字串或設定為 null
。
invalid_search_facets
如果發生以下情況,就會出現此錯誤
facets
參數無效。它應該是字串陣列、字串或設定為null
。- 用於分面的屬性未在
filterableAttributes
清單中定義
invalid_search_filter
如果發生以下情況,就會出現此錯誤
filter
參數的語法無效。- 用於篩選的屬性未在
filterableAttributes
清單中定義 - 保留關鍵字,例如
_geo
、_geoDistance
或_geoPoint
,被用作篩選器。
invalid_search_highlight_post_tag
highlightPostTag
參數無效。它應該是字串。
invalid_search_highlight_pre_tag
highlightPreTag
參數無效。它應該是字串。
invalid_search_hits_per_page
hitsPerPage
參數無效。它應該是整數。
invalid_search_limit
limit
參數無效。它應該是整數。
invalid_search_locales
locales
參數無效。
invalid_settings_facet_search
facetSearch
索引設定值無效。
invalid_settings_localized_attributes
localizedAttributes
索引設定值無效。
invalid_search_matching_strategy
matchingStrategy
參數無效。它應該設定為 last
或 all
。
invalid_search_offset
offset
參數無效。它應該是整數。
invalid_settings_prefix_search
prefixSearch
索引設定值無效。
invalid_search_page
page
參數無效。它應該是整數。
invalid_search_q
q
參數無效。它應該是字串或設定為 null
。
invalid_search_ranking_score_threshold
搜尋或多重搜尋請求中的rankingScoreThreshold
不是介於 0.0
和 1.0
之間的數字。
invalid_search_show_matches_position
showMatchesPosition
參數無效。它應該是布林值或設定為 null
。
invalid_search_sort
如果發生以下情況,就會出現此錯誤
sort
參數的語法無效。- 用於排序的屬性未在
sortableAttributes
清單中定義,或設定中缺少sort
排名規則。 - 保留關鍵字,例如
_geo
、_geoDistance
、_geoRadius
或_geoBoundingBox
,被用作篩選器。
invalid_settings_displayed_attributes
顯示屬性的值無效。它應該是空陣列、字串陣列或設定為 null
。
invalid_settings_distinct_attribute
獨特屬性的值無效。它應該是字串或設定為 null
。
invalid_settings_faceting_sort_facet_values_by
為sortFacetValuesBy
物件提供的值不正確。接受的值為 alpha
或 count
。
invalid_settings_faceting_max_values_per_facet
maxValuesPerFacet
欄位的值無效。它應該是整數或設定為 null
。
invalid_settings_filterable_attributes
可篩選屬性的值無效。它應該是空陣列、字串陣列或設定為 null
。
invalid_settings_pagination
maxTotalHits
欄位的值無效。它應該是整數或設定為 null
。
invalid_settings_ranking_rules
如果發生以下情況,就會出現此錯誤
- 設定酬載的格式無效。
- 指定了不存在的排名規則。
- 自訂排名規則格式錯誤。
- 保留關鍵字,例如
_geo
、_geoDistance
、_geoRadius
、_geoBoundingBox
或_geoPoint
,被用作自訂排名規則。
invalid_settings_searchable_attributes
可搜尋屬性的值無效。它應該是空陣列、字串陣列或設定為 null
。
invalid_settings_search_cutoff_ms
`searchCutoffMs 指定的值無效。它應該是一個整數,表示以毫秒為單位的截斷值。
invalid_settings_sortable_attributes
可排序屬性的值無效。它應該是空陣列、字串陣列或設定為 null
。
invalid_settings_stop_words
停用詞的值無效。它應該是空陣列、字串陣列或設定為 null
。
invalid_settings_synonyms
同義詞的值無效。它應該是物件或設定為 null
。
invalid_settings_typo_tolerance
如果發生以下情況,就會出現此錯誤
enabled
欄位無效。它應該是布林值或設定為null
。disableOnAttributes
欄位無效。它應該是字串陣列或設定為null
。disableOnWords
欄位無效。它應該是字串陣列或設定為null
。minWordSizeForTypos
欄位無效。它應該是整數或設定為null
。oneTypo
或twoTypos
的值無效。它應該是整數或設定為null
。
invalid_similar_id
提供的目標文件識別碼無效。文件識別碼可以是整數或字串類型,只能由字母數字字符 (a-z A-Z 0-9)、連字號 (-) 和底線 (_) 組成。
not_found_similar_id
Meilisearch 找不到目標文件。請確定您的目標文件識別碼與索引中的文件對應。
invalid_similar_attributes_to_retrieve
attributesToRetrieve
無效。它應該是字串陣列、字串或設定為 null。
invalid_similar_filter
filter
無效或包含缺少或無效運算子的篩選表達式。對於 POST 端點,篩選表達式必須是字串、字串陣列或字串陣列的陣列。對於 GET 端點,它必須是字串。
如果用於篩選的屬性未在 filterableAttributes
清單中定義,Meilisearch 也會拋出此錯誤。
invalid_similar_limit
limit
無效。它應該是整數。
invalid_similar_offset
offset
無效。它應該是整數。
invalid_similar_show_ranking_score
ranking_score
無效。它應該是布林值。
invalid_similar_show_ranking_score_details
ranking_score_details
無效。它應該是布林值。
invalid_embedder
embedder
無效。它應該是與已配置的嵌入器名稱對應的字串。
invalid_similar_ranking_score_threshold
在相似文件請求中,rankingScoreThreshold
不是介於 0.0
和 1.0
之間的數字。
invalid_state
資料庫處於無效狀態。刪除資料庫並重新索引應該可以解決問題。
invalid_store_file
data.ms
資料夾處於無效狀態。您的 b
檔案已損毀,或是 data.ms
資料夾已被檔案取代。
invalid_swap_duplicate_index_found
在indexes
陣列中用於交換索引請求的索引已被多次宣告。您必須為每個索引只宣告一次。
invalid_swap_indexes
如果發生以下情況,則會出現此錯誤
invalid_task_after_enqueued_at
afterEnqueuedAt
查詢參數無效。
invalid_task_after_finished_at
afterFinishedAt
查詢參數無效。
invalid_task_after_started_at
afterStartedAt
查詢參數無效。
invalid_task_before_enqueued_at
beforeEnqueuedAt
查詢參數無效。
invalid_task_before_finished_at
beforeFinishedAt
查詢參數無效。
invalid_task_before_started_at
beforeStartedAt
查詢參數無效。
invalid_task_canceled_by
canceledBy
查詢參數無效。它應該是整數。多個 uid
應以逗號 (,
) 分隔。
invalid_task_index_uids
indexUids
查詢參數包含無效的索引 uid。
invalid_task_limit
limit
參數無效。它必須是整數。
invalid_task_statuses
請求的工作狀態無效。請使用可能的值之一。
invalid_task_types
請求的工作類型無效。請使用可能的值之一。
invalid_task_uids
uids
查詢參數無效。
io_error
當主機系統裝置上沒有剩餘空間,或當資料庫沒有讀取或寫入權限時,通常會發生此錯誤。
index_primary_key_no_candidate_found
由於接收到的文件中不包含任何以 id
結尾的欄位,主鍵推斷失敗。手動指定主鍵,或將一些以 id
結尾的欄位新增至您的文件中。
malformed_payload
Content-Type 標頭與請求主體酬載格式不符,或格式無效。
missing_api_key_actions
酬載中缺少actions
欄位。
missing_api_key_expires_at
酬載中缺少expiresAt
欄位。
missing_api_key_indexes
酬載中缺少indexes
欄位。
missing_authorization_header
如果發生以下情況,則會出現此錯誤
- 請求的資源受到 API 金鑰保護,但該金鑰未在請求標頭中提供。請查看我們的安全教學課程以取得更多資訊
- 您正在使用與您的版本不符的授權標頭。v0.24 和更早版本使用
X-MEILI-API-KEY: apiKey
,而v0.25 及更高版本使用Authorization: Bearer apiKey
missing_content_type
酬載不包含Content-Type 標頭。目前,Meilisearch 僅支援 JSON、CSV 和 NDJSON。
missing_document_filter
此酬載缺少filter
欄位。
missing_document_id
文件不包含任何必要主鍵的值,因此無效。檢查目前新增中的文件,以找出無效的文件。
missing_index_uid
酬載缺少uid
欄位。
missing_facet_search_facet_name
需要facetName
參數。
missing_master_key
您需要先設定主金鑰,才能存取 /keys
路由。請在我們的安全教學課程中閱讀更多關於在啟動時設定主金鑰的資訊。
missing_payload
已指定 Content-Type 標頭,但沒有請求主體傳送到伺服器,或請求主體為空。
missing_swap_indexes
索引交換酬載缺少indexes
物件。
missing_task_filters
no_space_left_on_device
如果發生以下情況,就會出現此錯誤
- 主機系統分割區達到其最大容量,並且無法再接受寫入
- 工作佇列達到其限制,並且無法再接受寫入。您可以使用刪除工作端點刪除工作,以繼續寫入操作
not_found
找不到請求的資源。
payload_too_large
傳送到伺服器的酬載過大。請查看此指南,以自訂 Meilisearch 接受的最大酬載大小。
task_not_found
請求的工作不存在。請確保您使用正確的uid
。
too_many_open_files
索引大量文件(例如大小超過 3.5GB 的 JSON 檔案)可能會導致 Meilisearch 開啟過多的檔案描述符。根據您的機器,這可能會達到您系統的預設資源使用限制,並觸發 too_many_open_files
錯誤。使用 ulimit
或類似的工具來增加執行 Meilisearch 之前資源消耗限制。例如,在 UNIX 環境中呼叫 ulimit -Sn 3000
,以將允許的開啟檔案描述符數量提高到 3000。
too_many_search_requests
您已達到並行搜尋請求的限制。您可以透過重新啟動執行個體並將更高的值設定為--experimental-search-queue-size
來設定。
unretrievable_document
文件存在於儲存區中,但在檢索時發生錯誤。這可能來自資料庫中的不一致狀態。
vector_embedding_error
產生嵌入時發生錯誤。