Store data in ES and not on MongoDB using mongoosastic
up vote
1
down vote
favorite
I am trying to build a search engine project using mongoosastic
and was wondering if there was a way to store specific data fields only on elasticsearch
and not on MongoDB
as this would basically make it duplication of data.
For example we can use the es_indexed
to make sure elasticsearch
indexes the data and stores it to MongoDB
but is there something similar which can make sure elasticsearch
indexes the data but MongoDb
does not store it.
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true
)
User.plugin(mongoosastic)
I was checking the same with mongoose
as well but it wasn't working.
How can i achieve this?
mongodb elasticsearch mongoose mongoosastic
add a comment |
up vote
1
down vote
favorite
I am trying to build a search engine project using mongoosastic
and was wondering if there was a way to store specific data fields only on elasticsearch
and not on MongoDB
as this would basically make it duplication of data.
For example we can use the es_indexed
to make sure elasticsearch
indexes the data and stores it to MongoDB
but is there something similar which can make sure elasticsearch
indexes the data but MongoDb
does not store it.
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true
)
User.plugin(mongoosastic)
I was checking the same with mongoose
as well but it wasn't working.
How can i achieve this?
mongodb elasticsearch mongoose mongoosastic
I would not do that - ElasticSearch is focused on search and search performance; the guarantees it offers regarding correctness and robustness are weaker than other DB systems. Specifically, it's possible to lose data. Duplicating data is fine: one DB is your reference (MongoDB), and in ElasticSearch you index the data for the purpose of search.
– AdrienF
Nov 10 at 14:39
@AdrienF I am usingelasticsearch
for searching purposes only. I'm sending in the_id
and keys which needs to be searched only to theES Cluster
while all the needed data like passwords and other information is held inMongoDB
.
– Nithin
Nov 12 at 5:55
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am trying to build a search engine project using mongoosastic
and was wondering if there was a way to store specific data fields only on elasticsearch
and not on MongoDB
as this would basically make it duplication of data.
For example we can use the es_indexed
to make sure elasticsearch
indexes the data and stores it to MongoDB
but is there something similar which can make sure elasticsearch
indexes the data but MongoDb
does not store it.
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true
)
User.plugin(mongoosastic)
I was checking the same with mongoose
as well but it wasn't working.
How can i achieve this?
mongodb elasticsearch mongoose mongoosastic
I am trying to build a search engine project using mongoosastic
and was wondering if there was a way to store specific data fields only on elasticsearch
and not on MongoDB
as this would basically make it duplication of data.
For example we can use the es_indexed
to make sure elasticsearch
indexes the data and stores it to MongoDB
but is there something similar which can make sure elasticsearch
indexes the data but MongoDb
does not store it.
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true
)
User.plugin(mongoosastic)
I was checking the same with mongoose
as well but it wasn't working.
How can i achieve this?
mongodb elasticsearch mongoose mongoosastic
mongodb elasticsearch mongoose mongoosastic
asked Nov 10 at 2:56
Nithin
18312
18312
I would not do that - ElasticSearch is focused on search and search performance; the guarantees it offers regarding correctness and robustness are weaker than other DB systems. Specifically, it's possible to lose data. Duplicating data is fine: one DB is your reference (MongoDB), and in ElasticSearch you index the data for the purpose of search.
– AdrienF
Nov 10 at 14:39
@AdrienF I am usingelasticsearch
for searching purposes only. I'm sending in the_id
and keys which needs to be searched only to theES Cluster
while all the needed data like passwords and other information is held inMongoDB
.
– Nithin
Nov 12 at 5:55
add a comment |
I would not do that - ElasticSearch is focused on search and search performance; the guarantees it offers regarding correctness and robustness are weaker than other DB systems. Specifically, it's possible to lose data. Duplicating data is fine: one DB is your reference (MongoDB), and in ElasticSearch you index the data for the purpose of search.
– AdrienF
Nov 10 at 14:39
@AdrienF I am usingelasticsearch
for searching purposes only. I'm sending in the_id
and keys which needs to be searched only to theES Cluster
while all the needed data like passwords and other information is held inMongoDB
.
– Nithin
Nov 12 at 5:55
I would not do that - ElasticSearch is focused on search and search performance; the guarantees it offers regarding correctness and robustness are weaker than other DB systems. Specifically, it's possible to lose data. Duplicating data is fine: one DB is your reference (MongoDB), and in ElasticSearch you index the data for the purpose of search.
– AdrienF
Nov 10 at 14:39
I would not do that - ElasticSearch is focused on search and search performance; the guarantees it offers regarding correctness and robustness are weaker than other DB systems. Specifically, it's possible to lose data. Duplicating data is fine: one DB is your reference (MongoDB), and in ElasticSearch you index the data for the purpose of search.
– AdrienF
Nov 10 at 14:39
@AdrienF I am using
elasticsearch
for searching purposes only. I'm sending in the _id
and keys which needs to be searched only to the ES Cluster
while all the needed data like passwords and other information is held in MongoDB
.– Nithin
Nov 12 at 5:55
@AdrienF I am using
elasticsearch
for searching purposes only. I'm sending in the _id
and keys which needs to be searched only to the ES Cluster
while all the needed data like passwords and other information is held in MongoDB
.– Nithin
Nov 12 at 5:55
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Using select: false
will insert the data only to elasticsearch
and not mongodb
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true, select: false
)
User.plugin(mongoosastic)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Using select: false
will insert the data only to elasticsearch
and not mongodb
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true, select: false
)
User.plugin(mongoosastic)
add a comment |
up vote
0
down vote
accepted
Using select: false
will insert the data only to elasticsearch
and not mongodb
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true, select: false
)
User.plugin(mongoosastic)
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Using select: false
will insert the data only to elasticsearch
and not mongodb
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true, select: false
)
User.plugin(mongoosastic)
Using select: false
will insert the data only to elasticsearch
and not mongodb
var mongoose = require('mongoose')
, mongoosastic = require('mongoosastic')
, Schema = mongoose.Schema
var User = new Schema(
name: type:String, es_indexed:true
, email: String
, city: String
, comments: type:[Comment], es_indexed:true, select: false
)
User.plugin(mongoosastic)
answered Nov 10 at 9:12
Nithin
18312
18312
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53235643%2fstore-data-in-es-and-not-on-mongodb-using-mongoosastic%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I would not do that - ElasticSearch is focused on search and search performance; the guarantees it offers regarding correctness and robustness are weaker than other DB systems. Specifically, it's possible to lose data. Duplicating data is fine: one DB is your reference (MongoDB), and in ElasticSearch you index the data for the purpose of search.
– AdrienF
Nov 10 at 14:39
@AdrienF I am using
elasticsearch
for searching purposes only. I'm sending in the_id
and keys which needs to be searched only to theES Cluster
while all the needed data like passwords and other information is held inMongoDB
.– Nithin
Nov 12 at 5:55