-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
Support for Full Text Search Query #541
Conversation
Codecov Report
@@ Coverage Diff @@
## master #541 +/- ##
==========================================
+ Coverage 84.59% 84.62% +0.03%
==========================================
Files 48 48
Lines 3952 3960 +8
Branches 897 900 +3
==========================================
+ Hits 3343 3351 +8
Misses 609 609
Continue to review full report at Codecov.
|
@flovilmart and @SebC99 can you look over this? |
Why don't you use the diacritics, language and casesensitive options? |
That is for Parse-Server as a service. We can include them but we have to think about the current and future database adapters. Postgres requires a key for example and you have to install an extension for diacritics option. We should go for something simple here out of the box. The RestApi should be sufficient for specific full text search queries. |
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.
Alright, this looks pretty good for getting this in place. Some questions about removed code and suggestions for error test cases.
I wouldn't stress too much on the 'additional' features for full text, as this isn't going to be released just yet. It'll be nice to have this in place, we can guarantee we will at least have simplistic full text support in this sdk; rather than none.
@@ -13,15 +13,6 @@ var ParseSchema = require('../ParseSchema').default; | |||
var ParsePromise = require('../ParsePromise').default; | |||
var CoreManager = require('../CoreManager'); | |||
|
|||
function generateSaveMock(prefix) { |
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.
Unused?
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.
Yeah I copied the jest test from another file when I added schema support. Forgot I left those in 😅
return ParsePromise.as([]); | ||
}; | ||
var ajax = function(method, path, data, headers) { | ||
var name = path.substr(path.indexOf('/') + 1); |
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.
Unused here as well?
src/__tests__/ParseQuery-test.js
Outdated
try { | ||
const query = new ParseQuery('Item'); | ||
query.fullText(); | ||
} catch (e) { |
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.
Rather than just try/catching I would use expect(...).toThrow('my error...')
, that would be much more explicit in terms of that we are expecting and what we are expecting to receive as the error. You can see an example in the parse-server tests.
src/__tests__/ParseQuery-test.js
Outdated
try { | ||
const query = new ParseQuery('Item'); | ||
query.fullText('key'); | ||
} catch (e) { |
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.
Same here.
src/__tests__/ParseQuery-test.js
Outdated
try { | ||
const query = new ParseQuery('Item'); | ||
query.fullText('key', []); | ||
} catch (e) { |
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.
And here
@montymxb Thanks for the review, changes added. |
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.
Much better, I'd say this is approved .
@montymxb I'll start working on the docs after this gets in |
That would be good, that and aggregate as mentioned in #543 (we do have that here right?). |
Yes, quick question should we have documentation in docs folder, the gh-pages branch or both? |
The docs are automatically generated and push by Travis based on the JSdocs in the gh-pages branch, so no need to worry about it |
We'll want docs in the docs repo separately, but you should be good here. |
@flovilmart Shouldn't http://parseplatform.org/Parse-SDK-JS/api/master/ be in the README so new users can see it or am I missing something? I can add some examples to be auto generated for aggregate like I did for this PR. |
This is linked into http://docs.parseplatform.org/js/api |
@flovilmart Ah, I see. I'm so used to going to the guide in the readme instead of the api reference. |
Yeah, the guide is for the usage, also we have the API references in each repositories |
We should have a link to the API reference on the README 🔖 |
yep those are: http://parseplatform.org/Parse-SDK-JS/api -> lastest release http://parseplatform.org/Parse-SDK-JS/api/v1.11.0/ -> tagged release http://parseplatform.org/Parse-SDK-JS/api/master/ -> master branch |
@flovilmart probably should clarify specifically from the README on github repo page, not already from within the parseplatform.org location. https://github.com/parse-community/Parse-SDK-JS/. |
Yes I agree ! let's do it, I just posted the links for reference. |
How do I install the version where this feature has been merged? Im on Parse Server Are you going to bump the version of JS-SDK and subsequently include the same version in Parse Server. Its been 2 weeks since this has been merged. Hoping to see this merged to 1.11.0 at least without the need to upgrade parse server and parse server already points to 1.11.0. |
Guys, can you release a version with this fix or update 1.11.0 to include this? |
Any updates? |
@srameshr since this is an enhancement we'll probably wait a bit to bundle this with other features (if any are pending) and any fixes we may want. There's no official release schedule here, but if you feel that what we currently have is sufficient for a release go ahead and open up a separate issue for that. We can focus on talking about a release there, rather than mixing topics on this PR thread. |
@montymxb Yup, will do that. |
If you open up another issue keep it focused on a request for a release and your reason why. We may still hold it back if we decide we want to add more than what we currently have. This isn't necessarily another fix that needs to be merged, this just brings it to our attention so we can evaluate it formally. |
Shouldn't what needs to be merged, be evaluated on current needs of the community / users instead of how big the fix is or you deciding what is more than what you currently have? |
Absolutely, so please open up an issue for that topic so we can all deliberate on that specifically. Since this is a topic for a given PR that has been merged I would consider what you're talking about as a separate topic, i.e. drafting a release. Moving the convo there will allow us to have that focused on input for said topic specifically, and if it makes sense we'll go ahead and draft. |
Supersed: #470
Closes: parse-community/parse-server#4490, #476
To be used with Parse-Server 2.5.0+