Skip to content
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

Merged
merged 1 commit into from
Jun 3, 2017

Conversation

Mattchewone
Copy link
Contributor

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.

@daffl
Copy link
Member

daffl commented Jun 1, 2017

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.

Mattchewone pushed a commit to Mattchewone/feathers-docs that referenced this pull request Jun 1, 2017
For PR on elasticsearch adapter - feathersjs-ecosystem/feathers-elasticsearch#24

Signed-off-by: Matt <matt@ideajunction.uk>
@daffl daffl merged commit 215b402 into feathersjs-ecosystem:master Jun 3, 2017

validateType(value, '$sqs', 'object');
validateType(value.$fields, `value.$fields`, 'array');
validateType(value.$query, `value.$query`, 'string');
Copy link
Collaborator

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');
Copy link
Collaborator

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

@jciolek
Copy link
Collaborator

jciolek commented Jun 3, 2017

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 $sqs in "should return all types of queries together".

Thanks again,
Jacek

@Mattchewone
Copy link
Contributor Author

Sure thing, I'll try to get a PR in for those by Monday if I can.

No problem.

@daffl
Copy link
Member

daffl commented Jun 3, 2017

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'
Copy link
Collaborator

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.

@jciolek
Copy link
Collaborator

jciolek commented Jun 3, 2017

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?

daffl pushed a commit to feathersjs/docs that referenced this pull request Jun 7, 2017
For PR on elasticsearch adapter - feathersjs-ecosystem/feathers-elasticsearch#24

Signed-off-by: Matt <matt@ideajunction.uk>
@daffl
Copy link
Member

daffl commented Jun 7, 2017

Thank you! Merged the docs and released as v0.3.1.

From the sky somewhere over Greenland ✈️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants