I have a use case where i want to be able to search for all fulltext fields but don't show all of them in the search excerpt. For example including node type in search excerpt gets a bit wierd showing both machinename and humanfriendlyname.
I added a setting for excluding fields from excerpt on the hightlight processor form.
This was the easy way, maybe there is a better way?
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | 2195469-22.patch | 25.61 KB | drunken monkey |
Comments
Comment #2
freakalis commentedNew patch for testing
Comment #3
freakalis commentedComment #5
freakalis commentedThird time's the charm? :D
Comment #6
freakalis commentedNew patch, need to use strict in_array to work as expected.
Comment #8
freakalis commentedForgot to make previous patch relative... Here we go again.
Comment #9
freakalis commentedComment #11
drunken monkeyThanks for the great suggestion and the already very good patch!
I refactored a bit so the code becomes (hopefully) a bit cleaner, but other than that this was practically good to go.
Please see whether the attached updated patch still works for you and I'll commit it.
Comment #13
drunken monkeyCommitted.
Comment #15
drunken monkeyNeeds to be ported to D8.
Comment #16
drunken monkeyComment #17
rgpublicAdded a patch for Drupal 8. Never created or uploaded a patch here before, so pls. bear with me if anything is wrong.
Comment #18
rgpublicOops, small correction: Just because sth. is excluded from the excerpt doesn't mean we shouldnt highlight it. :-)
Comment #19
borisson_Setting to needs review, so the bot can have a look at it.
Comment #22
drunken monkeyGreat job for a first try!
You should probably read up on the Drupal coding standards, but on the whole this is pretty good.
The test fails are most likely due to the missing config schema update – that, some tweaks and an additional test case for this functionality are included in the attached patch.
Thanks for your work!
Comment #23
borisson_Comment #25
drunken monkeyThanks for reviewing!
Committed.
Thanks again, everyone!
Comment #26
drunken monkey