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

Search: Solr does not find words in italic

    XMLWordPrintable

Details

    • MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-65806-master
    • 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.

    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

            quen Sam Marshall
            quen Sam Marshall
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.