-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 #3747
Comments
Can you point out the documentation for full text search? If it requires a special operator? |
Hi @flovilmart . Yes it actually required 2 things and there is also one limitation
Full text search is supported since v2.6 of Mongo and currently you can create only one text index per collection. There is a great user guide + tutorial which explain what it is and to use it: https://code.tutsplus.com/tutorials/full-text-search-in-mongodb--cms-24835 |
Ok that's something worth considering! |
Yes it is! until now the solution was to create the full text search indexes in elastic search via mongoostatic. BTW! how much effort is to use Mongoose for executing the queries to the DB instead of the native MongoDB driver? (I am not talking about replacing the whole solution but maybe use it as optional dependency) |
Looks like it has already implemented this at https://github.com/seriph/parse-server @seriph Could you throw together a pull request? 😄 |
Sure, I put this together right around the time that this thread was started. Code works great but I consider it beta. Note that it requires changes to both the server and the API. I'll submit a pull soon. Until then, if you have urgent need in your projects, feel free to use the npm packages I submitted. Just drop and replace with parse and parse -server. https://www.npmjs.com/package/parse-server-text I've only updated the node/js API so far. Would love to see someone update for the other platforms. |
We need also to update the docs about this new capability. Thanks a lot ! |
Any news on this? It would be awesome! :) |
@flovilmart I can do a PR for this as Postgres also supports full text.
|
For the REST format, let's stick with something close to the mongo query format (as the GeoPoints do) |
Should I include all endpoints? Or do 1 at a time
|
The REST format ultimately should support all payloads, you can put validation on all at first, and write failing tests that are xit'ed this way we know this support is ongoing if you prefer spliting the work in multiple PR |
How does postgres apply?
…On Jun 2, 2017 6:20 PM, "Florent Vilmart" ***@***.***> wrote:
The REST format ultimately should support all payloads, you can put
validation on all at first, and write failing tests that are xit'ed this
way we know this support is ongoing if you prefer spliting the work in
multiple PR
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3747 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUl40u1IR54geM0mn9h2Fv5syJNRwv5ks5sAKbkgaJpZM4NF72e>
.
|
Postgres is another NOSQL database Parse supports like Mongo. |
Pull request submitted @flovilmart @hhanesand @SebC99 |
Anything new to this topic? :) |
It's available on parse-server since 1.5.0 but only accessible via REST API |
Thanks for the Update! @SebC99 Are there any docs about this? Couldn't find it on the REST Api Guide |
There's a PR from @dplewis in the docs repo |
Are there any instructions out there regarding using this feature w/in iOS? This feature looks very promising and I was hoping to use it in a project I am currently working on. Thanks in advance to anyone who can get back to me. |
@dplewis I am thinking about implementing support for full-text search over multiple fields. Would you be able to help me with this? I made it work on my local MongoDB, so I know it is possible. But I am not familiar with Postgres, REST, how to run tests and don't have much experience with contributing :) What was needed to make it work on MongoDB:
What do you think? Could we make it, please? :) |
@rihadavid We came up with a proposal for handling full-text over multiple fields. Adding indexes via Schema API I should have some time next week to work on it. If you want to open a PR feel free. @flovilmart We can provide an immediate solution to this problem or should we wait until the Schema API gets indexes? What do you think? |
@dplewis Actually, I had a bug in my test from previous comment and it is much easier than I thought. Just providing Like this: This really seems easy, maybe I will try the PR. Do you think it's OK to call it this way, with null? I am surprised it works, but it does! |
@rihadavid There are reasons why automatic index creation and catching Removing |
Ok, sure :) It seems too complicated, I am not a big friend with indexes. So I will rather let you work on it and keep my experiments in my local environment until you guys make it a stable feature :) Thank you for implementing this! |
@rihadavid Contributions are always welcomed. Trust me I didn't know about full-text, indexes, postgres, rest when I did this. |
so will the following work? I tried it aint, or do I have to recreate my Schema
|
@GoGross The REST docs has what you need. You don't need to recreate your schema
|
Do I have to update my schema? this fails |
Please update to the latest version of parse server. https://github.com/parse-community/parse-server/releases |
any way to use fulltext search within the iOS SDK? |
PR for iOS SDK already exists here: parse-community/Parse-SDK-iOS-OSX#1196 |
Going to go ahead and close this out now that the feature is merged in. Feel free to keep discussing however, if anything significant comes up feel free to open up another issue or let us know to pop this one back open, whichever works. Also relevant PRs look to be open on the sdks. From here I'll see if we can't get those in place now 👍 . For Android it's issue #751. If someone has a moment we would appreciate a PR over there as well! |
If anyone is reading this still being interested in the full-text search over multiple fields, I just figured out that it works out of the box - if you had manually created the multi-field text index in the db. All you need to do is to provide any of the fields defined in the text index (so that the parse-server is not trying to create the index for you). It will search over all of those fields defined in the text index, not just the one you provide 👍
Tested on Parse Server 2.8.4 with Mongo. |
@rihadavid Would you like to submit a PR? Passing in an array to create a compound index automatically. |
Hi @rihadavid Yes I already request it as a feature few days ago here: #5152 @dplewis I don't think that we should replace the current function that we have and use array instead of string because It can break current implementations. We can either create additional function something like: fullTextCompound or check inside the current function if the input is an array or string and create the indexes accordingly. |
can i try like this in class role? when using $regex is working |
|
Hey guys, a question: the query produces this JSON:
and it only returns items that contain this term on the title key But in the Atlas search tester, it generates this JSON:
And it returns great search results, with score counting with all keys. Is there a way to do this on fullText, or do I have to use aggregate? Thanks |
Hi, I wanted to know if parse-server support full text search. The full text search is available since MongoDB version 2.6 and it is possible to create text index (currently only one) which provides efficient search capabilities on text fields.
From the code it looks like that this capability has not been implemented ...
In case we need to add this capability i think we should perform the following tasks:
Thanks.
The text was updated successfully, but these errors were encountered: