Comments (7)
Now I have to land the ES version to 5.x
from monstache.
Perhaps the best solution to that would be to use JavaScript to coerce the no field into a number array type. So, you would need to detect form 2 or form 3 and use code to transform to form 1. Delete the index and rerun monstache to reindex the data with same type.
Or if you don’t need to search this field you could simply set up a mapping in ES such that the no field is not indexed.
from monstache.
Example to disable a field if you choose to not transform in JavaScript.
https://www.elastic.co/guide/en/elasticsearch/reference/current/enabled.html
from monstache.
thx!
If I keep all,The best way should be。。。。。?
no.length>2
no=2
no.no1=1
Suppose all want to query
Is not only using the low version 5.x?
from monstache.
I do not quite understand why it(es 6) does not have a better solution, only to delete the index
from monstache.
To my knowledge there's no difference between ES 5 and 6 with regards to this. When using dynamic mapping the first document indexed determines the field types and subsequent documents must conform to that type.
Once the index is created, you cannot change the type mapping of existing fields in ES 5 or 6, only reindex the into another index or delete the index and recreate. Are you saying you can successfully index a field with multiple data types in ES 5?
The javascript I was thinking of would be something like
module.exports = function(doc) {
if (doc.no) {
if (!Array.isArray(doc.no)) {
// only if ordering of values not important
doc.no = _.values(doc.no);
}
}
return doc;
}
from monstache.
I think I should understand. Thank you very much!
from monstache.
Related Issues (20)
- Monstache not initiating the first synchronisation of current data from MongoDB and keeps waiting for events on the change stream HOT 2
- Issue with updating status of collections mentioned in direct-read-namespaces to directreads collection HOT 3
- Monstache up and running but not indexing/documents, first sync with direct reads seems too slow HOT 2
- Monstache with elastic search 8.x cluster HOT 2
- MongoClient missing in filter plugin input HOT 1
- Mongo data is not synced to elastic unless monstache is restarted HOT 5
- key operation time not found
- When run in an AWS multinode environment monstache throws error "Error starting change stream...cannot run with a readConcern other than 'majority'..." HOT 1
- Featurerequest: Waiting until the target index exists HOT 2
- set es mapping in monstache
- AWS: Support EKS serviceaccount tokens HOT 2
- Data incomplete synchronization HOT 2
- A lot of strange logs on bulk update not_found even though the logic works good HOT 6
- FEATURE: "mongo-url" (MONSTACHE_MONGO_URL) to separate for reading data and writing configs
- Signal for other processes when Monstache is done with direct reads
- Monstache sends bulk POST to ES with data in different order than that from mongodb HOT 1
- High rated vulnerability in `golang.org/x/text` (CVE-2022-32149)
- Further understanding of the worker mode
- ARM64 Docker Image
- Failed to find unique document using index pattern While document exists
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monstache.