-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESConfig: configurable Elasticsearch document types to allow splitting index #1296
Commits on Oct 27, 2024
-
add MetaCPAN::ESConfig module to centralize ES config
Centralize Elasticsearch configuration in MetaCPAN::ESConfig. Allow overridden values from the main config file. This module is not meant to have any behavior aside from holding the configuration.
Configuration menu - View commit details
-
Copy full SHA for 1489794 - Browse repository at this point
Copy the full SHA 1489794View commit details -
adapt Mapping script to use ESConfig module
ESConfig knows how to find mapping data. Use it to find the mapping data as well as index configuration. The mapping data should be able to be moved into json files rather than json wrapped in a module. This can happen in the future.
Configuration menu - View commit details
-
Copy full SHA for edb8e78 - Browse repository at this point
Copy the full SHA edb8e78View commit details -
remove analysis configuration from MetaCPAN::Model
The analysis set in MetaCPAN::Model wasn't used for anything directly, generate the index deployment statements. The index settings we actually use lives in MetaCPAN::Script::Mapping::DeployStatement, so the declarations in MetaCPAN::Model were used for nothing.
Configuration menu - View commit details
-
Copy full SHA for 4e2c206 - Browse repository at this point
Copy the full SHA 4e2c206View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ce41ec - Browse repository at this point
Copy the full SHA 1ce41ecView commit details -
configure MetaCPAN::Model via ESConfig
Rather than searching for modules on disk, use the explicit configuration in ESConfig to configure MetaCPAN::Model.
Configuration menu - View commit details
-
Copy full SHA for 94c84ea - Browse repository at this point
Copy the full SHA 94c84eaView commit details -
check for compilation errors in document set modules
ElasticSearchX::Model ignores all errors in a ::Set package can't be loaded, and uses a generic ElasticSearchX::Model::Document::Set object. It's fine for the module to be missing, but compilation errors should be reported.
Configuration menu - View commit details
-
Copy full SHA for 491e640 - Browse repository at this point
Copy the full SHA 491e640View commit details -
disable critic rule prohibiting prototypes
PPI and thus Perl::Critic don't understand signatures, so the rule ends up prohibiting signatures as well
Configuration menu - View commit details
-
Copy full SHA for aff19bf - Browse repository at this point
Copy the full SHA aff19bfView commit details -
add doc method to MetaCPAN::Model
Allows getting a "type" object from a document name rather than needing to specify an index and type.
Configuration menu - View commit details
-
Copy full SHA for 967b34e - Browse repository at this point
Copy the full SHA 967b34eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f9f7dea - Browse repository at this point
Copy the full SHA f9f7deaView commit details -
Previously when trying to refresh indices, scripts would call $self->index->refresh. This would refresh the "currently used" index. That doesn't make any sense when splitting each type into its own index. This was also using ElasticSearchX::Model, which we want to get rid of. Instead, call ->indices->refresh via the Search::Elasticsearch object. This will refresh all indices, which is fine for our purposes. In the future, we could consider being more selective about which indices we are refreshing, but this is no worse than the old behavior.
Configuration menu - View commit details
-
Copy full SHA for a2e9202 - Browse repository at this point
Copy the full SHA a2e9202View commit details -
find ESXM types via model rather than index
Rather than using the same index to find other types, find them via the model. This means the types don't need to be in the same index.
Configuration menu - View commit details
-
Copy full SHA for 2f5b7d1 - Browse repository at this point
Copy the full SHA 2f5b7d1View commit details -
find es index/type via ESConfig rather than passing index around
Many parts of the code treated the index as the parent of all data, so it was the thing being passed around. That will no be true in the future. Instead, ESConfig can give the path (index+type) of each named document type. Convert most places passing around index to use es_doc_path.
Configuration menu - View commit details
-
Copy full SHA for 0e55e2e - Browse repository at this point
Copy the full SHA 0e55e2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d709a5e - Browse repository at this point
Copy the full SHA d709a5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 373da0d - Browse repository at this point
Copy the full SHA 373da0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74fcce0 - Browse repository at this point
Copy the full SHA 74fcce0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75b7021 - Browse repository at this point
Copy the full SHA 75b7021View commit details -
add ES and ESModel Catalyst model classes
Replaces the CPAN and User model classes. Removes magic namespace creation. Just return the Search::Elasticsearch object, or the model object.
Configuration menu - View commit details
-
Copy full SHA for 7097883 - Browse repository at this point
Copy the full SHA 7097883View commit details -
Configuration menu - View commit details
-
Copy full SHA for f72bdf1 - Browse repository at this point
Copy the full SHA f72bdf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c44ac51 - Browse repository at this point
Copy the full SHA c44ac51View commit details -
Configuration menu - View commit details
-
Copy full SHA for c61c516 - Browse repository at this point
Copy the full SHA c61c516View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5c5376 - Browse repository at this point
Copy the full SHA e5c5376View commit details -
create distributions with upsert
Trying to count distribution documents before creating is vulnerable to concurrency and consistency issues. Instead, use an upsert to create it.
Configuration menu - View commit details
-
Copy full SHA for ca7b31f - Browse repository at this point
Copy the full SHA ca7b31fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 762f54d - Browse repository at this point
Copy the full SHA 762f54dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 407b552 - Browse repository at this point
Copy the full SHA 407b552View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9c246d - Browse repository at this point
Copy the full SHA b9c246dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 374abed - Browse repository at this point
Copy the full SHA 374abedView commit details -
always use suggester for autocomplete
We have two autocomplete end points. The old one is no longer used by the front end. The new one uses the suggest API. Rewrite both end points to use the suggest SPI, just returning data in different forms.
Configuration menu - View commit details
-
Copy full SHA for a29eff9 - Browse repository at this point
Copy the full SHA a29eff9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c0b70ae - Browse repository at this point
Copy the full SHA c0b70aeView commit details -
fix script query syntax when using newer Elasticsearch
Older versions expect the key "inline", newer expect "source".
Configuration menu - View commit details
-
Copy full SHA for 38877ad - Browse repository at this point
Copy the full SHA 38877adView commit details -
remove use_dis_max from query_string query
use_dis_max is the default, and isn't supported in newer versions
Configuration menu - View commit details
-
Copy full SHA for 8d40746 - Browse repository at this point
Copy the full SHA 8d40746View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6571ec - Browse repository at this point
Copy the full SHA d6571ecView commit details