-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat(query) add $sqs simple_query_string query #24
feat(query) add $sqs simple_query_string query #24
Conversation
This looks great, thank you! Could you also make a pull request with the documentation you added against https://github.com/feathersjs/feathers-docs/blob/master/api/databases/elasticsearch.md? I'll let @jciolek if he has time otherwise I'll release it tomorrow. |
For PR on elasticsearch adapter - feathersjs-ecosystem/feathers-elasticsearch#24 Signed-off-by: Matt <matt@ideajunction.uk>
|
||
validateType(value, '$sqs', 'object'); | ||
validateType(value.$fields, `value.$fields`, 'array'); | ||
validateType(value.$query, `value.$query`, 'string'); |
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.
The second parameter should be '$sqs.$query'.
} | ||
|
||
validateType(value, '$sqs', 'object'); | ||
validateType(value.$fields, `value.$fields`, '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.
The second parameter should be simply $sqs.$fields
Hey, thanks a lot for your contribution! I know I'm late to the party and I apologise, I just found one tiny snag, do you think you could take care of it? Also, would be great if you could add a test for Thanks again, |
Sure thing, I'll try to get a PR in for those by Monday if I can. No problem. |
Sounds good. I'll make it a new patch release once it is up. Can we merge the docs in feathersjs/docs#650 already though? |
'description' | ||
], | ||
$query: '+like +javascript', | ||
$default_operator: 'and' |
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.
It would be great if we could change $default_operator
to simply $operator
. I try to keep the parameters as short as possible, as the queries tend to grow quite long quite quickly.
I've just added one more comment, @Mattchewone it would be great if you accommodate that as well. @daffl - then I guess we could merge the docs as well. How does that sound? |
For PR on elasticsearch adapter - feathersjs-ecosystem/feathers-elasticsearch#24 Signed-off-by: Matt <matt@ideajunction.uk>
Thank you! Merged the docs and released as v0.3.1. From the sky somewhere over Greenland |
Summary
In this pull request I have added the simple_query_string query to the adapter.
Open to suggestions on how to improve it, I tried to leave as much flexibility to the query as possible.