-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added fq() for passing in an object or multiple filters #241
added fq() for passing in an object or multiple filters #241
Conversation
Apologies for long delay in review! Will check it tomorrow. |
Did you already have the time to review it? Would be great to bring it to the master branch. background of this feature is: i'm migrating from https://github.com/godong9/solr-node client, which is no longer maintained. i could continue implementing further adaptations to ease up the migration from the deprecated client. |
lib/query.js
Outdated
*/ | ||
Query.prototype.fq = function (filters) { | ||
const self = this | ||
if (filters instanceof Array) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Array.isArray is the standard way to check this, I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 👍
@ni-do Wrote one super-small comment, will merge and publish the change after it is addressed! Please accept my apologies for the delay, was extremely swamped lately, but it's definitely better now, I'll do my best to review any future PRs way faster. |
@ni-do I will merge and publish new version as soon as CI passes, I have another request, though. Considering that we mostly rely on examples as our documentation, could you also add one using the new method to https://github.com/lbdremy/solr-node-client/tree/master/examples? That would help our users to discover the new method :) Separate PR would be fine, I don't want to delay publishing of this one any more. |
Released in 0.9.0 |
this feature wraps the matchFilter() on the query to be able to pass in either an object with 'field' and 'value' properties or an array with such objects.
test cases are contained within the given tests.
regards, ni-do