You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression
[ ] Bug report
[ x ] Feature request
[ x ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
We want to usemongoosastic in our project to store certain collections in ElasticSearch.
Our code structure is a bit different than the traditional examples given in Nest docs.
Our models are created independent of the service code. We create models and push to them to a private npm repository so that it can be reused across various other modules.
When injecting this model in the controller, We are not able to access the mongoosastic functions. Also when using save() methods, it is not indexing to ElasticSearch.
Expected behavior
We should be able to use the plugins in @Module declarations.
Minimal reproduction of the problem with instructions
Mentioned in Current behavior section
What is the motivation / use case for changing the behavior?
To be able to use plugins for mongoose models, independent of whether the models are included in NestJS projects.
@shekohex because our models cannot contain any configs or implementations. Elastic Search is something which is required in just a couple of service and the model is being used in various other places.
I'm submitting a...
Current behavior
We want to usemongoosastic in our project to store certain collections in ElasticSearch.
Our code structure is a bit different than the traditional examples given in Nest docs.
Our models are created independent of the service code. We create models and push to them to a private npm repository so that it can be reused across various other modules.
Here is a sample model example:
And we are importing it into our services like so:
As per the mongoosastic docs, To have a model indexed into Elasticsearch simply add the plugin.
So We are adding the plugin like so,
When injecting this model in the controller, We are not able to access the mongoosastic functions. Also when using
save()
methods, it is not indexing to ElasticSearch.Expected behavior
We should be able to use the plugins in
@Module
declarations.Minimal reproduction of the problem with instructions
Mentioned in Current behavior section
What is the motivation / use case for changing the behavior?
To be able to use plugins for mongoose models, independent of whether the models are included in NestJS projects.
Environment
The text was updated successfully, but these errors were encountered: