-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Full Text Search Support #3904
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
Full Text Search Support #3904
Conversation
Does this support the textScore from MongoDB? I don't see a test for it or any of the code, though everything else is pretty similar to my PR |
Working on a test case now. Unless you want to do it. |
Codecov Report
@@ Coverage Diff @@
## master #3904 +/- ##
==========================================
+ Coverage 90.26% 90.28% +0.02%
==========================================
Files 114 114
Lines 7588 7641 +53
==========================================
+ Hits 6849 6899 +50
- Misses 739 742 +3
Continue to review full report at Codecov.
|
@flovilmart I would do that but I don't like how @seriph copy and pasted my PR an hour after I posted it. He had over a month to do a PR. Also I announced that I was going to do a PR so something like this wouldn't happen. |
@seriph's code is way old, and that's open source, let's work together to be more efficient, it's not a time for disputes guys. |
You gotta treat people with respect man, the way you're acting and telling @seriph down is not acceptable, not matter how many commits you have in the project. @seriph had a fork with the feature in months ago, and I expect he's now pissed and not likely to contribute to the project again. Read our CODE_OF_CONDUCT. I can not tolerate your behaviour with other contributors. |
@flovilmart I understand it won't happen again. @seriph I'll help you get this PR in |
Also, on the code side, $text should not be a special key, but the REST format should be:
|
Haha, to tell you the truth @dplewis I suspected you did the same when I saw you'd posted in the thread where someone had asked me about my fork, then your PR shows up with almost identical code. The textScore code has been live in production on an ecommerce site for months, so surprised you're not thinking it works. Thanks for the professionalism @flovilmart, happy to contribute in the future. I have matching code for the JS API if it helps. |
So we're all good then, if you guys can coordinate, and work together to get the best of that PR, I'll happily create a new |
@flovilmart since you can only have 1 Text Index "myKey" doesn't matter. @seriph I just added a commit for textScore and a test for it. Look at it and you'll see why I thought your textScore didn't work. I didn't see a keyword 'textScore' in any of the docs. @flovilmart thanks for creating that branch. |
@flovilmart do we commit to that branch and move the conversation over to @seriph PR. |
Happy either way
…On Sat, Jun 3, 2017 at 10:57 AM, Diamond Lewis ***@***.***> wrote:
@flovilmart <https://github.com/flovilmart> do we commit to that branch
and move the conversation over to @seriph <https://github.com/seriph> PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3904 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUl43VlTwcs8XH9V7DCSLcrfCeY4GT3ks5sAZCIgaJpZM4Nu-0F>
.
|
Is that true as well for Postgres? (The single index?) |
Postgres doesn't need an index but can only have 1 index |
Mongo throws an error if index doesn't exist. I'm writing a test case for it now. |
And on Postgres, there's no need either to specify which key of the table will be looked up for search? |
I'm still doing research on it. But we'll know soon enough. From the looks of it were going to use SELECT [mykey] FROM [className] or SELECT to_tsvector() |
I still have 4 test cases to write then we can merge. Index Exists |
@dplewis are you sure you need to to change the |
@flovilmart I've added support for Postgres. Users have to keep in mind that this will have unexpected consequences if their indexes aren't set up properly Also is travis not running because of the |
closing to force travis to pick up the build |
spec/ParseQuery.spec.js
Outdated
}, done.fail); | ||
}); | ||
|
||
it_exclude_dbs(['postgres'])('fullTextSearch: $caseSensitive', (done) => { |
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.
why still excluding PG?
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.
Or can you group together the tests related to mongo (excluding PG) in a sub describe?
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.
There are 3 excludes here. I've added comments in the postgres adapter for $caseSensitive and $diraticSensitive.
No Index... You don't need index to do PG
Case Sensitive... Full text doesn't support case sensitive on PG. You could use regex or make a second column for lower case string.
Diratic Sensitive... Can be automated on a per table / class basis based on setup and index on PG.
Should I replace the comments with error instructions in postgresAdapter
or leave it be?
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.
Probably you should Error the query and point to instructions / have a clear way to resolution
It's looking super great IMHO, @seriph what do you think? |
I separated the tests and added the error messages |
Sorry to ask for something more, could we put all the tests in a new file? The ParseQuery.spec.js is already huge :) perhaps ParseQuery.FullTextSearch.spec.js? |
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.
This is looking really amazing!!!! Thanks!
Would you be keen to take care of the docs as well?
@flovilmart Sure no problem. Glad I could help. How should we format this? @seriph can you work on updating the javascript sdk? |
For now let's start with the REST docs, we'll see the SDK's after right? |
Right |
Any chance that an API for this will come into the JS SDK? |
https://docs.parseplatform.org/js/guide/#full-text-search It seems there is a but returns empty array |
PR for #3747
Adds Full Text Support for mongo and postgres