Tired of writing elasticsearch reindex scripts? Are you constantly encountering data synchronization problems between the database and elasticsearch? Are you crying about the lack of namespaces in the organization of indexes in your cluster? Nothing lost! Here is searchpunch and punch this shit out!
- 0-downtime reindex
- automatic removing unused indices
- synchronization of data between any database using async generators
- automatic detection of index settings / mappings modification and reindex modified indices
- bulk reindex of records
- group indices into namespaces
- fully typed error handling using Either monad
- failure tolerance, automatic rollback if index does not match healthy criteria
- CLI tools
- ๐ง Monadic elasticsearch layer
- ๐ง Synchronization of Elasticsearch indices
- ๐ง CLI utilities
yarn add @searchpunch/reindex
- Load current mapping schema into memory
- Check if specified index exists in ElasticSearch
- If not:
- Create new index
- Perform reindex of all records in storage
- If exists compare mappings with ElasticSearch index stored in
meta
fields as hash- If equal skip reindex
- If differs perform full reindex
- If not:
- Building ecommerce shops with aggregated products
- Searching logs in dashboard
- Autocomplete select inputs
- ... and in many many other places
MIT License
Copyright (c) 2023 Mateusz Bagiลski
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.