plots2 icon indicating copy to clipboard operation
plots2 copied to clipboard

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

Open milaaraujo opened this issue 8 years ago • 30 comments

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:

  • [x] remove the auto-added asterisk on this line, and treat "boolean search" as an expert search type. - Done (#4022)
  • [x] add a link to more info on boolean searches: https://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html - TODO

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 avatar Sep 26 '18 02:09 milaaraujo

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!


jywarren avatar Oct 01 '18 21:10 jywarren

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

milaaraujo avatar Oct 15 '18 06:10 milaaraujo

Sure!!

On Mon, Oct 15, 2018, 2:50 PM Camila Araújo [email protected] wrote:

Hey @jywarren https://github.com/jywarren, can we keep this as a single issue and maybe use it as a help wanted issue for GCI?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3490#issuecomment-429727707, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ6Jwv8VDIAjAQxq4G7nSDoltPujRks5ulDACgaJpZM4W5zur .

jywarren avatar Oct 16 '18 23:10 jywarren

This task is published on GCI dashboard. Thanks all.

SidharthBansal avatar Oct 22 '18 16:10 SidharthBansal

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

angeryrohan avatar Nov 13 '18 17:11 angeryrohan

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

milaaraujo avatar Nov 14 '18 04:11 milaaraujo

@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 !

angeryrohan avatar Nov 14 '18 04:11 angeryrohan

you could do that, although it's quite ambitious! Perhaps we could start by linking to an existing one, but then changing the link to yours if you complete one!

On Tue, Nov 13, 2018 at 11:56 PM Rohan Singh [email protected] wrote:

@milaaraujo https://github.com/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 !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3490#issuecomment-438537376, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ4G5la_5xPhnJKsI0OPY8EcLqjw7ks5uu6JRgaJpZM4W5zur .

jywarren avatar Nov 14 '18 23:11 jywarren

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

angeryrohan avatar Nov 15 '18 09:11 angeryrohan

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.

jonxuxu avatar Nov 18 '18 18:11 jonxuxu

@rohancl is working on this one!

milaaraujo avatar Nov 20 '18 03:11 milaaraujo

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

angeryrohan avatar Nov 21 '18 05:11 angeryrohan

Best of luck on your exams @rohancl . Here's my pull request: https://github.com/publiclab/plots2/pull/4019

jonxuxu avatar Nov 21 '18 14:11 jonxuxu

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

oorjitchowdhary avatar Nov 22 '18 11:11 oorjitchowdhary

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

jonxuxu avatar Nov 22 '18 13:11 jonxuxu

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

milaaraujo avatar Nov 22 '18 15:11 milaaraujo

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

milaaraujo avatar Nov 22 '18 20:11 milaaraujo

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

jonxuxu avatar Nov 22 '18 20:11 jonxuxu

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

milaaraujo avatar Nov 22 '18 20:11 milaaraujo

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

jonxuxu avatar Nov 23 '18 02:11 jonxuxu