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

add query builder #2

Closed
vsimko opened this issue Jun 20, 2018 · 1 comment
Closed

add query builder #2

vsimko opened this issue Jun 20, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@vsimko
Copy link
Owner

vsimko commented Jun 20, 2018

In select function the parameters for solr are now passed as an object, e.g. as follow:

const solr = require('node-solr-lambda').prepareSolrClient()
const results = await solr.select({
  q: 'label:test',
  sort: 'label desc',
  core: 'my_core'
})

It would be nice to have a builder function that creates the parameters in a more convenient way. For example by making use of intellisense in vscode:

const {prepareSolrClient, query} = require('node-solr-lambda')
const solr = prepareSolrClient()
const params = query('label:test').sort('label').desc()
const results = await solr.select(params, 'my_core')
@vsimko vsimko added the enhancement New feature or request label Jun 20, 2018
@vsimko vsimko self-assigned this Jun 20, 2018
@vsimko
Copy link
Owner Author

vsimko commented Dec 4, 2018

I decided not to do it because I think that the current implementation is much better and closer to the actual solr API. The vscode IDE uses our typescript type definitions to provide intellisense assistance.
The type information is only needed at design time and irrelevant to the runtime.
This way, we can happily code in plain javascript while leveraging optional type checking from typescript.

@vsimko vsimko added the wontfix This will not be worked on label Dec 4, 2018
@vsimko vsimko closed this as completed Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant