![]() The synonyms_path setting change only succeeds if the new file is present on all the nodes, thereby insuring from failed/partial deployments. The proposal is to make the synonyms_path setting, a dynamic setting, when defined with "updateable": true flag. (Just to be clear, the proposal below does not intend to solve this problem but provides a way to circumvent this, refer to Reusability point) This breaks the immutability construct for index time analysis. Index time analyzers could also be accidentally updated - Since elasticsearch does not block user from using the same underlying file for query time analysis on one index while index time analysis on other, if a user updates the file, the node restarts can lead to index time analysis also gets impacted as the new ingested documents would use the updated synonym list from the reloaded synonymMap.No way for monitoring this behavior - Since elasticsearch does not know which version of the file is in memory used for synonym analysis, it becomes hard for user to successfully detect and monitor for such inconsistencies in production systems. ![]() This would again cause inconsistent results for queries as different nodes will have different synonymMap in memory. This happens because elasticsearch does not have a way to distinguish the updated file from the existing one. Problem with partial synonym file deployment - If the updated synonym file could not be deployed successfully to all nodes, the reload (either user triggered or from node restarts) still succeeds as it only cares for the presence of the file, irrespective of any version.This breaks the query consistency as only the restarted node would return results based on updated synonyms list while the other nodes would still return results based on previous synonym list. What would happen in this case is requests going to shard on the restarted node would return different results from the request going to the same shard(replica) on a different node because of different synonymMap in memory. Query consistency issue - Unexpected elasticsearch process restarts can cause automatic reloading of updated synonym files (rebuilding of synonymMap) without user explicitly calling the reload_search_analyzers API.These things create a few problems as described below. Also elasticsearch does not have a way to distinguish the updated file from the previous one as there is no versioning support internally. However, reload_search_analyzers API is not the only way to reload this updated analyzers into memory, it also happens inadvertently due to node restarts or elasticsearch process restarts. Thus if synonyms list needs to be updated, the only way is to update the same underlying file (analysis/synonym.txt in the above example) and then invoke reload_search_analyzers API. However, the synonyms_path setting, once created, cannot be changed (without close/open index) because the setting is not dynamic. ![]() close/open index, if the underlying synonyms list needs to be updated. The idea of having dynamic reload functionality(via reload_search_analyzers api) is to avoid any downtime for query time analysis as by making these filters dynamically reloadable, we are able to prevent 1) re-indexing of index data or 2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |