Moodle
  1. Moodle
  2. MDL-25655

Glossary: Search always in "full text"-searchmode

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.3.6, 2.4.3, 2.5
    • Fix Version/s: 2.2.1, 2.3.7, 2.4.4
    • Component/s: Glossary
    • Labels:
    • Testing Instructions:
      Hide

      Create one glossary with these 2 entries, both with case-sensitive and match whole words disabled (in the linking section):

      • concept: cat, definition: traditional enemies of dogs, alias: cats
      • concept: dog, definition: traditional enemies of cats, alias: dogs

      1) In the glossary main page there is one "search" button with one input text box. On the right "fullsearch" is ticked by default.

      2) With "fullsearch" ticked, perform these searches and verify results taking into account that all them mean that the contents of the definition are being searched:

      2a) "enemies" => returns 2 entries, with the word highlighted. Verify that the "fullsearch" checkbox continues ticked.
      2b) "cat" => returns 2 entries, with "cat" highlighted in both.
      2c) "cats" => return 2 entries, with "cats" highlighted in the dog entry.
      2d) "+cat" => return 1 entry (the cat one).
      2e) "+cats" => return 2 entries, with "cats" highlighted in the dog entry.
      2f) "+cats -dog" => return 1 entry (the cat one).
      2g) "+cats -dogs" => return 0 entries.

      3) With "fullsearch" un-ticked, perform these searches and verify results taking into account that all them mean that the contents of the definition are being completely ignored:

      3a) "enemies" => returns 0 entries. Verify that the "fullsearch" checkbox continues un-ticked.
      3b) "cat" => returns 1 entry, the cat one, with "cat" highlighted.
      3c) "cats" => return 1 entry, the cat one.
      3d) "+cat" => return 1 entry, the cat one, with "cat" highlighted.
      3e) "+cats" => return 1 entry, the cat one.
      3f) "+cats -dog" => return 1 entry (the cat one).
      3g) "+cats -dogs" => return 1 entry (the cat one).

      That's all. Ciao

      Show
      Create one glossary with these 2 entries, both with case-sensitive and match whole words disabled (in the linking section): concept: cat, definition: traditional enemies of dogs, alias: cats concept: dog, definition: traditional enemies of cats, alias: dogs 1) In the glossary main page there is one "search" button with one input text box. On the right "fullsearch" is ticked by default. 2) With "fullsearch" ticked, perform these searches and verify results taking into account that all them mean that the contents of the definition are being searched: 2a) "enemies" => returns 2 entries, with the word highlighted. Verify that the "fullsearch" checkbox continues ticked. 2b) "cat" => returns 2 entries, with "cat" highlighted in both. 2c) "cats" => return 2 entries, with "cats" highlighted in the dog entry. 2d) "+cat" => return 1 entry (the cat one). 2e) "+cats" => return 2 entries, with "cats" highlighted in the dog entry. 2f) "+cats -dog" => return 1 entry (the cat one). 2g) "+cats -dogs" => return 0 entries. 3) With "fullsearch" un-ticked, perform these searches and verify results taking into account that all them mean that the contents of the definition are being completely ignored: 3a) "enemies" => returns 0 entries. Verify that the "fullsearch" checkbox continues un-ticked. 3b) "cat" => returns 1 entry, the cat one, with "cat" highlighted. 3c) "cats" => return 1 entry, the cat one. 3d) "+cat" => return 1 entry, the cat one, with "cat" highlighted. 3e) "+cats" => return 1 entry, the cat one. 3f) "+cats -dog" => return 1 entry (the cat one). 3g) "+cats -dogs" => return 1 entry (the cat one). That's all. Ciao
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
    • Pull Master Branch:
    • Rank:
      15098

      Description

      If we try to search over glossary entries we noticed that ticking the "fulltext-search" checkbox doesn't work as expected, or especially not ticking the box doesn't work in the right way.

      We would expect - as described in the documentation - that the search only shows entries with the corresponding term name if we don't tick the box. But it also searches trough the description fields. So we it shows us entries which have for example "Documentation" in the full description and not only the glossary entry called "Documentation".

      Ticking the checkbox causes the search to work in the expected way.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          This issue has now been duplicated. I've triaged and bumped the issue slightly.

          Show
          Michael de Raadt added a comment - This issue has now been duplicated. I've triaged and bumped the issue slightly.
          Hide
          Darko Grabar added a comment - - edited

          Hi, has there been any progress with this. Full text search is still always on (Moodle 2.4.1.)

          Show
          Darko Grabar added a comment - - edited Hi, has there been any progress with this. Full text search is still always on (Moodle 2.4.1.)
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Oh, yes... it was completely rewritten and borked by the 1.9 => 2.0 conversion of the module (MDL-15109).

          Looking for a fix...

          Show
          Eloy Lafuente (stronk7) added a comment - Oh, yes... it was completely rewritten and borked by the 1.9 => 2.0 conversion of the module ( MDL-15109 ). Looking for a fix...
          Hide
          Eloy Lafuente (stronk7) added a comment - - edited

          Sending it straight to integration, the change is really simple.

          Note to integrator: The codechecker will report that the lines have bad indentation, but that's caused because the whole file has bad indentation everywhere. So I did the patch using correct "relative" indentation but didn't want to fix the whole file (too much noise).

          I've created MDL-38514 about to fix all the whitespace and comments in the glossary module.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - - edited Sending it straight to integration, the change is really simple. Note to integrator: The codechecker will report that the lines have bad indentation, but that's caused because the whole file has bad indentation everywhere. So I did the patch using correct "relative" indentation but didn't want to fix the whole file (too much noise). I've created MDL-38514 about to fix all the whitespace and comments in the glossary module. Ciao
          Hide
          Aparup Banerjee added a comment -

          Thanks Eloy, thats been integrated.

          incidentally, i've the same backup course loaded here so tested the dogs and cats glossary here on master pretty quickly .

          Show
          Aparup Banerjee added a comment - Thanks Eloy, thats been integrated. incidentally, i've the same backup course loaded here so tested the dogs and cats glossary here on master pretty quickly .
          Hide
          Eloy Lafuente (stronk7) added a comment -

          hehe, that course rocks, lol!

          Show
          Eloy Lafuente (stronk7) added a comment - hehe, that course rocks, lol!
          Hide
          David Monllaó added a comment -

          It passes, all works as expected.

          Only commenting that in 2d) the cat entry name is also highlighted

          Show
          David Monllaó added a comment - It passes, all works as expected. Only commenting that in 2d) the cat entry name is also highlighted
          Hide
          Damyon Wiese added a comment -

          This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads).

          Thanks for your contributions!

          Show
          Damyon Wiese added a comment - This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads). Thanks for your contributions!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: