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

Boolean Full-Text Searches - add a link to more info on boolean searches #3490

Closed
2 tasks done
milaaraujo opened this issue Sep 26, 2018 · 30 comments · Fixed by #4022
Closed
2 tasks done

Boolean Full-Text Searches - add a link to more info on boolean searches #3490

milaaraujo opened this issue Sep 26, 2018 · 30 comments · Fixed by #4022
Labels
gci-candidate help wanted requires help by anyone willing to contribute Ruby search

Comments

@milaaraujo
Copy link
Collaborator

milaaraujo commented Sep 26, 2018

The boolean full-text search has the capability to support operators such as +, - and *. We are using the boolean full-text search here, but with an auto-added asterisk:

        if type == :boolean
          query = connection.quote(query.to_s + "*")
          nids = Revision.select("node_revisions.nid, node_revisions.body, node_revisions.title, MATCH(node_revisions.body, node_revisions.title) AGAINST(#{query} IN BOOLEAN MODE) AS score")
            .where("MATCH(node_revisions.body, node_revisions.title) AGAINST(#{query} IN BOOLEAN MODE)")
            .limit(limit)
            .distinct
            .collect(&:nid)

So we need help to:


We are preparing to participate in Google Code-in, and have reserved this issue for participants in GCI - but we'd love to have your help with another one! Please check out https://code.publiclab.org to see more.

@milaaraujo milaaraujo added help wanted requires help by anyone willing to contribute search labels Sep 26, 2018
@milaaraujo milaaraujo added this to To do in Search improvement via automation Sep 26, 2018
@jywarren jywarren added fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration gci-candidate Ruby labels Oct 1, 2018
@jywarren
Copy link
Member

jywarren commented Oct 1, 2018

This could be broken into 2 first-timers-only issues! The one with the "more info link" may need a link to a line of code, however. 👍

Thanks!!!

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!


@milaaraujo
Copy link
Collaborator Author

Hey @jywarren, can we keep this as a single issue and maybe use it as a help wanted issue for GCI?

@jywarren
Copy link
Member

jywarren commented Oct 16, 2018 via email

@milaaraujo milaaraujo removed add-code-links break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet labels Oct 20, 2018
@SidharthBansal
Copy link
Member

This task is published on GCI dashboard. Thanks all.

@angeryrohan
Copy link

@SidharthBansal @jywarren can you elaborate a bit about adding a link to the more info part of this task, Thanks !

@milaaraujo
Copy link
Collaborator Author

Hey @rohancl, this issue has two parts. First, the auto-added asterisk on this part of the code (https://github.com/publiclab/plots2/blob/master/app/models/node.rb#L39-L44) should be removed. Then we need to add a link add to give more info on boolean searches and help users to understand how to use the boolean search. This link is a good one to use: https://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html

@angeryrohan
Copy link

@milaaraujo Hey thanks for replying,One more doubt, I wanted to know whether I can make my own tutorial of Boolean searches in MySQL to complete the second objective of this task. Thanks !

@jywarren
Copy link
Member

jywarren commented Nov 14, 2018 via email

@angeryrohan
Copy link

@jywarren Yeah sure, don't get me wrong, by tutorial I meant How I did the steps to solve the this task and all.

@jonxuxu
Copy link
Member

jonxuxu commented Nov 18, 2018

Hi, I'd like to work on this issue. Is anyone still working on this issue? Sorry it's getting hard to know if available tasks on GCI are taken/in progress.

@milaaraujo
Copy link
Collaborator Author

@rohancl is working on this one!

@angeryrohan
Copy link

Actually, I've encountered my exams, they're like a bunch of storms coming to my face. I am really sorry, I cannot proceed any further contributing in this organisation. @JonathanXu1 feel free to continue with this task. I am really sorry @milaaraujo

@jonxuxu
Copy link
Member

jonxuxu commented Nov 21, 2018

Best of luck on your exams @rohancl . Here's my pull request: #4019

Search improvement automation moved this from To do to Done Nov 22, 2018
@oorjitchowdhary
Copy link
Member

This task is completed right?
I can still see it on the gci platform..

@jonxuxu
Copy link
Member

jonxuxu commented Nov 22, 2018

I'm waiting for my submission to be accepted. Thanks!

@milaaraujo
Copy link
Collaborator Author

@JonathanXu1 you should claim the GCI tasks before you start to work on them! 😉

@milaaraujo milaaraujo changed the title Boolean Full-Text Searches - remove asterisk Boolean Full-Text Searches - add a link to more info on boolean searches Nov 22, 2018
@milaaraujo milaaraujo reopened this Nov 22, 2018
Search improvement automation moved this from Done to In progress Nov 22, 2018
@milaaraujo
Copy link
Collaborator Author

Reopening this because we still need to add a link add to give more info on boolean searches and help users to understand how to use the boolean search. This link is a good one to use: https://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html

@jonxuxu
Copy link
Member

jonxuxu commented Nov 22, 2018

I added the link as a comment in line 40, is that sufficient?

@milaaraujo
Copy link
Collaborator Author

@JonathanXu1, no... We need to add the link for the publiclab users on the website! ;)

@jonxuxu
Copy link
Member

jonxuxu commented Nov 23, 2018

Oh sorry I misunderstood that. Could I get a pointer to the page in the website where boolean searches are made? Thanks!

@CodeSarthak
Copy link
Collaborator

Is this still open? Can I work on it if @JonathanXu1 is not working on it?

@CodeSarthak
Copy link
Collaborator

Hi @milaaraujo Where is boolean search being implemented on the webpage, in the front end?

@jonxuxu
Copy link
Member

jonxuxu commented Nov 25, 2018

I'd like to continue working on it but the task was not available when I tried to claim it. @milaaraujo here's the solution with a screenshot of a link in the frontend. Sorry I misunderstood the second requirement for the task.

Edit: The task is made available again. I claimed it and submitted it.

@jonxuxu jonxuxu mentioned this issue Nov 25, 2018
4 tasks
@milaaraujo
Copy link
Collaborator Author

Hey @CodeSarthak, @JonathanXu1 is already working on it. But we have a lot of available tasks!

@JonathanXu1, I will review it tomorrow. Thanks!

@CodeSarthak
Copy link
Collaborator

Ok @milaaraujo, but I think we are not so high on tasks right now. We have about 6-7 open tasks on GCI right now.

@jonxuxu
Copy link
Member

jonxuxu commented Nov 26, 2018

Yeah if we could work on more tasks that would be great!

@milaaraujo
Copy link
Collaborator Author

We are working on open new tasks/issues! :)

Search improvement automation moved this from In progress to Done Nov 26, 2018
@jywarren
Copy link
Member

jywarren commented Nov 26, 2018 via email

@jonxuxu
Copy link
Member

jonxuxu commented Nov 26, 2018

@jywarren I'd be glad to help! Perhaps we can open gci issues as we work on them haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gci-candidate help wanted requires help by anyone willing to contribute Ruby search
Projects
No open projects
7 participants