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

Search: Solr does not find words in italic

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.4, 3.7.1, 3.8
    • Fix Version/s: 3.6.5, 3.7.1
    • Component/s: Global search
    • Labels:
    • Testing Instructions:
      Hide

      To carry out this test you will need a Solr search engine installed for your server to use. [There are some instructions on https://docs.moodle.org/37/en/Global_search - it involves installing a PHP extension and the Solr software itself.]

      1. Configure your server to use the Solr search engine, instead of the simple search (verify the setting under admin / plugins / search / manage global search).
      2. If you have a lot of content on your server, make sure that search indexing is up to date. Or use a different test server that doesn't have much content!
      3. Create a new Page activity in a course that you are enrolled on. Set the name to anything, leave the description blank, and set the content to the following, remembering to make the second special word italic:
        • This is thoroughly sprooglefronked and bleepitydibbled but only one of those words will be found.
      4. Run search indexing, for example by going to the Admin / Server / Scheduled tasks page and clicking Run now next to Global search indexing. Wait for indexing to complete.
      5. Using the search icon in the top bar, search for sprooglefronked.
        • EXPECTED: Your page should appear in the results. (This already worked.)
      6. Now search for bleepitydibbled.
        • EXPECTED: The page should also appear in the results.
        • BEFORE FIX: There were no results for this search.
      Show
      To carry out this test you will need a Solr search engine installed for your server to use. [There are some instructions on https://docs.moodle.org/37/en/Global_search - it involves installing a PHP extension and the Solr software itself.] Configure your server to use the Solr search engine, instead of the simple search (verify the setting under admin / plugins / search / manage global search). If you have a lot of content on your server, make sure that search indexing is up to date. Or use a different test server that doesn't have much content! Create a new Page activity in a course that you are enrolled on. Set the name to anything, leave the description blank, and set the content to the following, remembering to make the second special word italic: This is thoroughly sprooglefronked and bleepitydibbled but only one of those words will be found. Run search indexing, for example by going to the Admin / Server / Scheduled tasks page and clicking Run now next to Global search indexing . Wait for indexing to complete. Using the search icon in the top bar, search for sprooglefronked . EXPECTED: Your page should appear in the results. (This already worked.) Now search for bleepitydibbled . EXPECTED: The page should also appear in the results. BEFORE FIX: There were no results for this search.
    • Affected Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_36_STABLE, MOODLE_37_STABLE
    • Pull 3.7 Branch:
      MDL-65806-m37
    • Pull Master Branch:
      MDL-65806-master

      Description

      If you use the Solr search engine, it does not find words that were entered in italic. This is caused by the 'content_to_text' function adding underlines around italic words. Solr treats the underlines as part of the word and does not find the word when searched normally.

      The simple search engine does not behave this way.

        Attachments

          Activity

            People

            Assignee:
            quen Sam Marshall
            Reporter:
            quen Sam Marshall
            Peer reviewer:
            Tim Hunt
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Jul/19

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 30 minutes
                3h 30m