Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

actor index controller #58

Merged
merged 70 commits into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
61ce749
update tokio and disable all routes
MarinPostma Feb 26, 2021
672a4b5
add actors/ support index creation
MarinPostma Feb 26, 2021
6bcc302
receive update
MarinPostma Feb 26, 2021
658166c
implement document push
MarinPostma Feb 26, 2021
c4dfd5f
implement search and fix document addition
MarinPostma Feb 27, 2021
62532b8
WIP concurent index store
MarinPostma Mar 1, 2021
9aca6fa
completely file backed udpates
MarinPostma Mar 3, 2021
7c7143d
remove IndexController interface
MarinPostma Mar 3, 2021
70d935a
refactor index serach for better error handling
MarinPostma Mar 3, 2021
e285404
handle errors when sendign payload to actor
MarinPostma Mar 3, 2021
3cd799a
fix update files created in the wrong place
MarinPostma Mar 3, 2021
eff8570
handle ctrl-c shutdown
MarinPostma Mar 3, 2021
ae3c8af
enable faceted search
MarinPostma Mar 4, 2021
9e2a95b
refactor search
MarinPostma Mar 4, 2021
a56db85
refactor update handler
MarinPostma Mar 4, 2021
8432c85
refactor index controller
MarinPostma Mar 4, 2021
47138c7
update settings
MarinPostma Mar 4, 2021
17b8469
list settings
MarinPostma Mar 4, 2021
f3d65ec
implement retrieve documents
MarinPostma Mar 4, 2021
581dcd5
implement retrieve one document
MarinPostma Mar 4, 2021
181eaf9
restore update documents
MarinPostma Mar 4, 2021
ae5581d
implement delete documents
MarinPostma Mar 4, 2021
a955e04
implement clear documents
MarinPostma Mar 4, 2021
6a0a9fe
async update store
MarinPostma Mar 4, 2021
f090f42
multi index store
MarinPostma Mar 4, 2021
c2282ab
non local udpate actor
MarinPostma Mar 4, 2021
a9c7b73
implement list all updates
MarinPostma Mar 5, 2021
7d28f8c
implement get single udpate
MarinPostma Mar 6, 2021
86211b1
import routes modules in main
MarinPostma Mar 6, 2021
d9254c4
implement index delete
MarinPostma Mar 6, 2021
281a445
implement list indexes
MarinPostma Mar 6, 2021
ced32af
implement get single index
MarinPostma Mar 6, 2021
ac4d795
update created at when updating index
MarinPostma Mar 8, 2021
2f93cce
auto index creation
MarinPostma Mar 8, 2021
06403a5
clean index actor unwraps
MarinPostma Mar 8, 2021
4e1597b
clean Uuid resolver actor
MarinPostma Mar 8, 2021
562da9d
fix test compilation
MarinPostma Mar 10, 2021
8061a04
add test assets
MarinPostma Mar 10, 2021
5ecf514
restructure project
MarinPostma Mar 10, 2021
0cd8869
update relevant changes from master
MarinPostma Mar 10, 2021
a56e8c1
fix tests
MarinPostma Mar 10, 2021
53cf500
uuid resolver hard state
MarinPostma Mar 10, 2021
2ae90f9
lazy load update store
MarinPostma Mar 11, 2021
1fad72e
fix test bug with tempdir
MarinPostma Mar 11, 2021
79a4bc8
use meta from milli
MarinPostma Mar 11, 2021
3f68460
fix update dedup
MarinPostma Mar 11, 2021
40b3451
fix unexisting update store + race conditions
MarinPostma Mar 11, 2021
30dd790
handle badly formatted index uid
MarinPostma Mar 11, 2021
66b64c1
correct error on settings delete unexisting index
MarinPostma Mar 11, 2021
8617bcf
add ranking rules
MarinPostma Mar 11, 2021
271c8ba
change index name to uid
MarinPostma Mar 11, 2021
7d96378
fix add primary key on index creation
MarinPostma Mar 11, 2021
e4d45b0
fix various bugs
MarinPostma Mar 11, 2021
77d5dd4
remove open_or_create
MarinPostma Mar 12, 2021
c4846da
implement update index
MarinPostma Mar 12, 2021
2ee2e6a
clean project
MarinPostma Mar 12, 2021
c61fab1
Merge branch 'main' into actor-index-controller
MarinPostma Mar 12, 2021
49b74b5
enable jemalloc only on linux
MarinPostma Mar 12, 2021
99c89cf
use options max db sizes
MarinPostma Mar 13, 2021
adc71a7
fix displayed attributes in document retrieval
MarinPostma Mar 15, 2021
77c0a0f
add test get document displayed attributes
MarinPostma Mar 15, 2021
c079f60
fixup! fix displayed attributes in document retrieval
MarinPostma Mar 15, 2021
fcf1d4e
fix displayed attributes in search
MarinPostma Mar 15, 2021
55fadd7
change facetedAttributes to attributesForFaceting
MarinPostma Mar 15, 2021
f727dcc
update milli
MarinPostma Mar 15, 2021
0c80d89
clean Cargo.toml
MarinPostma Mar 15, 2021
01479dc
rename name to uid in code
MarinPostma Mar 15, 2021
abbea59
fix clippy warnings
MarinPostma Mar 15, 2021
c29b868
use actix cors git dependency
MarinPostma Mar 15, 2021
dd32480
last review edits + fmt
MarinPostma Mar 15, 2021
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
766 changes: 521 additions & 245 deletions Cargo.lock

Large diffs are not rendered by default.

33 changes: 24 additions & 9 deletions meilisearch-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub enum Code {
}

impl Code {

/// ascociate a `Code` variant to the actual ErrCode
fn err_code(&self) -> ErrCode {
use Code::*;
Expand All @@ -94,17 +93,23 @@ impl Code {
// thrown when requesting an unexisting index
IndexNotFound => ErrCode::invalid("index_not_found", StatusCode::NOT_FOUND),
InvalidIndexUid => ErrCode::invalid("invalid_index_uid", StatusCode::BAD_REQUEST),
OpenIndex => ErrCode::internal("index_not_accessible", StatusCode::INTERNAL_SERVER_ERROR),
OpenIndex => {
ErrCode::internal("index_not_accessible", StatusCode::INTERNAL_SERVER_ERROR)
}

// invalid state error
InvalidState => ErrCode::internal("invalid_state", StatusCode::INTERNAL_SERVER_ERROR),
// thrown when no primary key has been set
MissingPrimaryKey => ErrCode::invalid("missing_primary_key", StatusCode::BAD_REQUEST),
// error thrown when trying to set an already existing primary key
PrimaryKeyAlreadyPresent => ErrCode::invalid("primary_key_already_present", StatusCode::BAD_REQUEST),
PrimaryKeyAlreadyPresent => {
ErrCode::invalid("primary_key_already_present", StatusCode::BAD_REQUEST)
}

// invalid document
MaxFieldsLimitExceeded => ErrCode::invalid("max_fields_limit_exceeded", StatusCode::BAD_REQUEST),
MaxFieldsLimitExceeded => {
ErrCode::invalid("max_fields_limit_exceeded", StatusCode::BAD_REQUEST)
}
MissingDocumentId => ErrCode::invalid("missing_document_id", StatusCode::BAD_REQUEST),

// error related to facets
Expand All @@ -117,16 +122,26 @@ impl Code {
DocumentNotFound => ErrCode::invalid("document_not_found", StatusCode::NOT_FOUND),
Internal => ErrCode::internal("internal", StatusCode::INTERNAL_SERVER_ERROR),
InvalidToken => ErrCode::authentication("invalid_token", StatusCode::FORBIDDEN),
MissingAuthorizationHeader => ErrCode::authentication("missing_authorization_header", StatusCode::UNAUTHORIZED),
MissingAuthorizationHeader => {
ErrCode::authentication("missing_authorization_header", StatusCode::UNAUTHORIZED)
}
NotFound => ErrCode::invalid("not_found", StatusCode::NOT_FOUND),
PayloadTooLarge => ErrCode::invalid("payload_too_large", StatusCode::PAYLOAD_TOO_LARGE),
RetrieveDocument => ErrCode::internal("unretrievable_document", StatusCode::BAD_REQUEST),
RetrieveDocument => {
ErrCode::internal("unretrievable_document", StatusCode::BAD_REQUEST)
}
SearchDocuments => ErrCode::internal("search_error", StatusCode::BAD_REQUEST),
UnsupportedMediaType => ErrCode::invalid("unsupported_media_type", StatusCode::UNSUPPORTED_MEDIA_TYPE),
UnsupportedMediaType => {
ErrCode::invalid("unsupported_media_type", StatusCode::UNSUPPORTED_MEDIA_TYPE)
}

// error related to dump
DumpAlreadyInProgress => ErrCode::invalid("dump_already_in_progress", StatusCode::CONFLICT),
DumpProcessFailed => ErrCode::internal("dump_process_failed", StatusCode::INTERNAL_SERVER_ERROR),
DumpAlreadyInProgress => {
ErrCode::invalid("dump_already_in_progress", StatusCode::CONFLICT)
}
DumpProcessFailed => {
ErrCode::internal("dump_process_failed", StatusCode::INTERNAL_SERVER_ERROR)
}
}
}

Expand Down
Loading