Open NicoledeGreef opened 3 months ago
I think I've solved this. In the search settings, it was very mysterious, because everything appeared to be configured correctly, including the "21x boost' that OP had given the title field. I reindexed it several times, and tried adding my own test record, which suffered the same problem as the Fruitsations.
Then I searched the Google, and found this thread, suggesting "Are you using views? Did you add the filed to the list of fields to be searched there?".
And sure enough, we are using views. In our site_search view, there is this:
... inside of which was this: I have now unselected "Rendered HTML output" (which I think is the full rendered Node minus the title), such that it now searches "all available fulltext fields".
Et voila! The Fruitsation search, on Test
If this seems to work correctly now in your opinion, @NicoledeGreef, I can make the same change directly on the prod server via the UI.
In the meantime, I've submitted a PR with the fix in it: https://github.com/bcgov/MFIN-Data-Catalogue/pull/531
Great sleuthing, @danhgov Thanks!
The only thing I noticed was that searching for "fruit", "fruits", and "fruitsa" did not yield the Fruitsations record result. It did show up when I searched for "fruitsat"; does this mean there is a minimum character requirement for matches, I wonder?
Moving this ticket back from "Done", as the PR is not actually merged yet.
The PR for this ticket is now merged.
@NicoledeGreef, this code is on dev/test now.
Deployed to PROD.
Describe the bug
When searches are performed the results are not including text matches in the title of the metadata record.
Expected behaviour
Based on past discussion and this ticket, search results should be taking into account matches found in the title text as well as the description.
Additional context
Example: in Test env there is a record titled "fruitsations test check" https://test.cat.data.fin.gov.bc.ca/fruitsations-test-check
When you search for fruit or fruitstations the record is not returned. If you search for "test check" it is returned because those words also exist in the Description/Summary field.
This was first noticed in Production when searching for bca; the following records are not returned: https://cat.data.fin.gov.bc.ca/bca-residential-property-inventory https://cat.data.fin.gov.bc.ca/bca-commercial-property-inventory
CC: @ChristaBull