Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-16004

Moodle forums advance search, exact phrase search does not work

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.2, 2.4.4, 2.7.4, 2.8.2
    • Fix Version/s: None
    • Component/s: Forum
    • Labels:
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_24_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE

      Description

      Under Advance Search in the Moodle forms, there is the ability to serach for an exact phrase. However the actual search will return results for every word in the phrase which gives flase positives.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            tsala Helen Foster added a comment -

            Ron, thanks for your report. I'm going to change this to an MDL issue, as I assume it's the same for all Moodle sites and not only moodle.org.

            Show
            tsala Helen Foster added a comment - Ron, thanks for your report. I'm going to change this to an MDL issue, as I assume it's the same for all Moodle sites and not only moodle.org.
            Hide
            tsala Helen Foster added a comment -

            Assigning to forum lead.

            Show
            tsala Helen Foster added a comment - Assigning to forum lead.
            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting this issue.

            We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

            If you believe that this issue is still relevant to current versions (2.3 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

            Michael d;

            4d6f6f646c6521

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.3 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; 4d6f6f646c6521
            Hide
            rmeske Ron Meske added a comment -

            This is still an issue on the current version of moodle on moodle.org.

            Show
            rmeske Ron Meske added a comment - This is still an issue on the current version of moodle on moodle.org.
            Hide
            cfollin Chris Follin added a comment -

            This is still a problem in 2.x, definitely in 2.4.4.

            Show
            cfollin Chris Follin added a comment - This is still a problem in 2.x, definitely in 2.4.4.
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Hi all,

            Is there any chance you could give an example of how this is broken?

            All of the queries that I've tried so far seem to work and I can't see any issues.

            Cheers,

            Andrew

            Show
            dobedobedoh Andrew Nicols added a comment - Hi all, Is there any chance you could give an example of how this is broken? All of the queries that I've tried so far seem to work and I can't see any issues. Cheers, Andrew
            Hide
            rmeske Ron Meske added a comment -

            I just tried this and it looks like the results are now correct but the highlighting of the search term is not. The Advanced search being referred to is the one in the Forums..

            1. Select one of the courses in the Community Forums. I selected "Moodle in English"
            2. Select Advanced Search
            3. In the field "This exact phrase must appear in the post" enter a phrase. I used "Articulate and Captivate".
            4. Click the Search Forums button

            The results displayed did have the exact phrase. However, the word "and" was highlighted every time it occurred in each post instead of the exact phrase. I tried a four word phrase and the two words in the middle were highlighted throughout the posts returned. If I use a two word phrase no words are highlighted. It appears the highlighting is ignoring the beginning and ending words.

            Ron

            Show
            rmeske Ron Meske added a comment - I just tried this and it looks like the results are now correct but the highlighting of the search term is not. The Advanced search being referred to is the one in the Forums.. 1. Select one of the courses in the Community Forums. I selected "Moodle in English" 2. Select Advanced Search 3. In the field "This exact phrase must appear in the post" enter a phrase. I used "Articulate and Captivate". 4. Click the Search Forums button The results displayed did have the exact phrase. However, the word "and" was highlighted every time it occurred in each post instead of the exact phrase. I tried a four word phrase and the two words in the middle were highlighted throughout the posts returned. If I use a two word phrase no words are highlighted. It appears the highlighting is ignoring the beginning and ending words. Ron
            Hide
            dobedobedoh Andrew Nicols added a comment -

            Thanks for raising this issue Ron,

            I suspect that this issue stems from the search system treating the word "and" as a keyword.

            We'll need to work out how best to handle this issue for when users want to use and as a keyword.

            Show
            dobedobedoh Andrew Nicols added a comment - Thanks for raising this issue Ron, I suspect that this issue stems from the search system treating the word "and" as a keyword. We'll need to work out how best to handle this issue for when users want to use and as a keyword.
            Hide
            rmeske Ron Meske added a comment -

            Hi Andrew,

            I think there is more than an issue with a keyword.

            Here is an example of exact phrases that do not work properly

            • "site upload" - this will return posts that have the phrase but no words are highlighted
            • "site upload limit" - this will return form posts that have the phrase but it will only highlight every occurrence of the word "upload".
            • "the site upload limit" - this will return posts that have the phrase, but will only highlight every occurrence of the words "site" and "upload" whether they are next to each other or not.
            Show
            rmeske Ron Meske added a comment - Hi Andrew, I think there is more than an issue with a keyword. Here is an example of exact phrases that do not work properly "site upload" - this will return posts that have the phrase but no words are highlighted "site upload limit" - this will return form posts that have the phrase but it will only highlight every occurrence of the word "upload". "the site upload limit" - this will return posts that have the phrase, but will only highlight every occurrence of the words "site" and "upload" whether they are next to each other or not.

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: