Bug 6149 - Operator Highlighted in Search Results
Summary: Operator Highlighted in Search Results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Martin Renvoize
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on:
Blocks: 11270
  Show dependency treegraph
 
Reported: 2011-04-08 17:39 UTC by Zachary Spalding
Modified: 2016-12-05 21:22 UTC (History)
12 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Patch to add syspref controlled stopwords to highlighting. (4.79 KB, patch)
2013-08-09 16:09 UTC, Martin Renvoize
Details | Diff | Splinter Review
Patch to add syspref controlled stopwords to highlighting (6.97 KB, patch)
2013-08-19 14:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Patch to add syspref controlled stopwords to highlighting (5.71 KB, patch)
2013-08-21 15:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Patch to add syspref controlled stopwords to highlighting (6.46 KB, patch)
2013-08-21 20:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Stopwords for Result Highlighting (6.52 KB, patch)
2013-08-29 01:40 UTC, Campbell Reid-Tait
Details | Diff | Splinter Review
Bug 6149 - Stopwords for Result Highlighting (6.67 KB, patch)
2013-09-05 14:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Stopwords for result highlighting (6.67 KB, patch)
2013-09-18 11:39 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Stopwords for Result Highlighting (6.80 KB, patch)
2013-09-29 06:50 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 6149 - Stopwords for Result Highlighting (7.13 KB, patch)
2013-10-05 21:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 6149: Follow-up - Operator highlighted in search results (6.07 KB, patch)
2013-10-27 14:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED OFF] Bug 6149: Follow-up - Operator highlighted in search results (6.24 KB, patch)
2013-10-28 11:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Follow-up - Stopwords for Result Highlighting (2.37 KB, patch)
2013-10-28 12:20 UTC, Martin Renvoize
Details | Diff | Splinter Review
[SIGNED OFF] Bug 6149: Follow-up - Stopwords for Result Highlighting (Bootstrap) (2.47 KB, patch)
2013-10-28 22:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 6149: Follow-up - Stopwords for Result Highlighting (Bootstrap) (2.37 KB, patch)
2013-10-29 09:21 UTC, Martin Renvoize
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6149: Follow-up - Stopwords for Result Highlighting (Bootstrap) (2.46 KB, patch)
2013-11-18 17:50 UTC, Owen Leonard
Details | Diff | Splinter Review
[NOT PASSED QA] Bug 6149: Follow-up - Stopwords for Result Highlighting (opac-results-grouped) (2.23 KB, patch)
2013-11-19 12:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149: Follow-up - Stopwords for Result Highlighting (9.30 KB, patch)
2013-11-19 13:12 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Stopwords for Result Highlighting (7.23 KB, patch)
2013-11-21 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 6149: Follow-up - Operator highlighted in search results (6.30 KB, patch)
2013-11-21 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 6149: Follow-up - Stopwords for Result Highlighting (Bootstrap) (2.48 KB, patch)
2013-11-21 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 6149 - RM followup. (7.80 KB, patch)
2014-03-11 09:09 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149: Follow-up - Stopwords for Result Highlighting (opac-results-grouped) (2.17 KB, patch)
2014-07-26 13:00 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Stopwords for Result Highlighting (7.34 KB, patch)
2014-07-26 13:00 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149: Follow-up - Operator highlighted in search results (6.42 KB, patch)
2014-07-26 13:01 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - RM followup. (7.93 KB, patch)
2014-07-26 13:01 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Stopwords for Result Highlighting (7.34 KB, patch)
2014-07-26 13:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149: Follow-up [defaults] - Stopwords for Result Highlighting (6.42 KB, patch)
2014-07-26 13:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149: Follow-up [bootstrap] - Stopwords for Result Highlighting (2.52 KB, patch)
2014-07-26 13:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149: Follow-up [grouped] - Stopwords for Result Highlighting (2.21 KB, patch)
2014-07-26 13:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Follow-up [syspref] - Stopwords for Result Highlighting (7.97 KB, patch)
2014-07-26 13:27 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 6149 - Follow-up [syspref] - Stopwords for Result Highlighting (9.79 KB, patch)
2014-08-15 13:08 UTC, Martin Renvoize
Details | Diff | Splinter Review
[PASSED QA] Bug 6149 - Stopwords for Result Highlighting (7.71 KB, patch)
2014-08-15 15:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 6149: Follow-up [defaults] - Stopwords for Result Highlighting (6.47 KB, patch)
2014-08-15 15:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 6149: Follow-up [bootstrap] - Stopwords for Result Highlighting (2.58 KB, patch)
2014-08-15 15:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 6149: Follow-up [grouped] - Stopwords for Result Highlighting (2.27 KB, patch)
2014-08-15 15:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 6149 - Follow-up [syspref] - Stopwords for Result Highlighting (10.17 KB, patch)
2014-08-15 15:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 6149: (qa followup) sysprefs should be alphabetically sorted (2.43 KB, patch)
2014-09-05 14:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Zachary Spalding 2011-04-08 17:39:22 UTC
When I do an advance search and use an operator like 'and' or 'or' it is highlighted in the search results.

This link will demonstrate the issue where I did a search for nurse or care,and letters or are highlighted in the results.

http://vassar.koha.senylrc.org/cgi-bin/koha/opac-search.pl?idx=kw&q=nurse&op=or&idx=kw&q=care&op=and&idx=kw&do=Search&limit=branch%3ANPKVBH&sort_by=title_az


Koha version: 	3.02.06.000
Comment 1 Zachary Spalding 2011-07-06 18:13:10 UTC
Currently using Koha version: 	3.04.01.000,  also I think it is affecting search results.  There are records being return with only the operator highlighted.

Is this something that can be fixed in  ccl.properties file?
Comment 2 Chris Cormack 2011-07-06 18:28:34 UTC
The highlighting is done by css/jquery client side. 

So it cant be fixed/changed server side, and indeed does not affect anything in the search.

If your search is returning bad results, that is unrelated to highlighting, and would need its own bug
Comment 3 Kyle M Hall 2013-07-29 15:10:31 UTC
I believe this is still a valid bug. The highlighter needs to be more intelligent about what it highlights. Perhaps we can just tell it to never highlight the boolean operators, or pass the keywords only to it?
Comment 4 Martin Renvoize 2013-08-09 16:09:19 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2013-08-19 13:39:09 UTC
(In reply to Martin Renvoize from comment #4)
> Note for QA.. I'm sure there's a follow-up required for this patch with the
> correct DB additions for adding a syspref, but I'm reminding myself on the
> etiquette for that before submitting the follow-up.

Martin, take a look at the installer/data/mysql/updatedatabase.pl file. You should add a new entry (as the 3.13.00.015 entry). You have to add the new syspref to the installer/data/mysql/sysprefs.sql file too.

This patch does not apply anymore.
Comment 6 Martin Renvoize 2013-08-19 14:56:09 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2013-08-21 13:08:46 UTC
1) OpacHighlightStopWords is used the database update and sysprefs sql file, but OpacHighlightedStopWords is used everywhere else.
2) Please use the TT plugin function Koha.Preference() to get the preference, rather than passing it it from the perl script
3) It's not working for me!
Comment 8 Martin Renvoize 2013-08-21 15:15:20 UTC Comment hidden (obsolete)
Comment 9 Martin Renvoize 2013-08-21 15:17:50 UTC
Thanks for the comments Kyle, I've done as asked with regard to silly mistakes in the sql update files and using the TT Plugin to fetch the preference now. (I didn't realise we had that yet.. oops)

As for 'It's not working!', could you elaborate at all?  What browser are you using, is javascript enabled (without it highlighting won't work at all)?

Cheers

Martin
Comment 10 Kyle M Hall 2013-08-21 17:51:40 UTC
I'm using chrome. Enabling the feature and setting it to "OR|or|Or" did not stop the "or"s in my results from being highlighted. I'll retest and let you know if I find any errors.
Comment 11 Kyle M Hall 2013-08-21 18:12:03 UTC
Martin, I've retested and discovered my problem. I had assumed this would affect the staff intranet! It works great in the OPAC. Do you think you could provide a followup to add this functionality to the staff intranet as well?
Comment 12 Martin Renvoize 2013-08-21 20:38:05 UTC
That's a relief, I hadn't got a clue why it wasn't working otherwise.

Patch coming up to also add the stopwords to the staff client.. to be honest, I'de completely forgotten the staff client also does the highlighting.. looking through it, the code is very inconsistent with the opac method and doesn't apply to the detailed result view, only the search results page.  Anywho.. I'll patch the results page as is.

Martin
Comment 13 Martin Renvoize 2013-08-21 20:39:46 UTC Comment hidden (obsolete)
Comment 14 Martin Renvoize 2013-08-28 13:54:27 UTC
I don't think this actually got to QA.. so resetting to Needs Signoff, as I think the 'Failed QA' status is holding it back from any further comment or testing.
Comment 15 Campbell Reid-Tait 2013-08-29 01:40:16 UTC Comment hidden (obsolete)
Comment 16 Campbell Reid-Tait 2013-08-29 01:46:36 UTC
Works on OPAC.

Followup patch to add same stopwords to Staff Client Search Results page, still needed.
Comment 17 Martin Renvoize 2013-08-29 10:27:39 UTC
Hi Campbell, 

It should all be in the one patch, including the staff client piece... I can see it's still in the patch you signed off from the diffs..

Could you give any errors you see if it's really not working?

Martin
Comment 18 Jonathan Druart 2013-09-05 08:08:32 UTC
(In reply to Martin Renvoize from comment #17)
> Could you give any errors you see if it's really not working?

Hi Martin,

It does not work neither for me on the staff interface. Try to use the Koha plugin at the top of the results.tt file ([%  USE Koha %]).
Moreover, I think it would be great to have the list of stopwords case insensitive, in order to avoid to list all variants (The, the, THE).

Marked as Failed QA.
Comment 19 Martin Renvoize 2013-09-05 14:23:48 UTC
Hi Jonathan

(In reply to Jonathan Druart from comment #18)
> It does not work neither for me on the staff interface. Try to use the Koha
> plugin at the top of the results.tt file ([%  USE Koha %]).

Thanks for the heads up regarding calling the Koha plugin in results.tt, I've now added this and tested. Seems to be working as expected to me.

> Moreover, I think it would be great to have the list of stopwords case
> insensitive, in order to avoid to list all variants (The, the, THE).

I've now taken this into account too, making it case insensitive was a great idea!

Patch to follow. . .
Comment 20 Martin Renvoize 2013-09-05 14:25:04 UTC Comment hidden (obsolete)
Comment 21 Martin Renvoize 2013-09-05 14:27:03 UTC
Also noted that these highlighting systems are out of sync between opac and staff client, including the lack of staff client code for Bug 10686.

Once I've got this bit out of the way, I'm tempted to submit that as a speerate bug and patch.
Comment 22 I'm just a bot 2013-09-18 11:22:38 UTC
Applying: Bug 6149 - Stopwords for Result Highlighting
Using index info to reconstruct a base tree...
M	installer/data/mysql/sysprefs.sql
M	installer/data/mysql/updatedatabase.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
M	koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
M	koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt
Auto-merging koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/sysprefs.sql
Patch failed at 0001 Bug 6149 - Stopwords for Result Highlighting
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 23 Martin Renvoize 2013-09-18 11:39:40 UTC Comment hidden (obsolete)
Comment 24 I'm just a bot 2013-09-29 06:01:24 UTC
Applying: Bug 6149 - Stopwords for Result Highlighting
Using index info to reconstruct a base tree...
M	installer/data/mysql/sysprefs.sql
M	installer/data/mysql/updatedatabase.pl
Falling back to patching base and 3-way merge...
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging installer/data/mysql/sysprefs.sql
Patch failed at 0001 Bug 6149 - Stopwords for Result Highlighting
The copy of the patch that failed is found in:
   /home/christopher/git/koha/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Comment 25 Chris Cormack 2013-09-29 06:50:46 UTC Comment hidden (obsolete)
Comment 26 Katrin Fischer 2013-10-05 21:05:29 UTC
Hm, bit confused about the example values: and|And|or|Or

1) Do we need 'And' and 'and' when the values are now case insensitive?
>I've now taken this into account too, making it case insensitive was a great >idea!

2) Why not list 'not'?

I will continue to test, this could go into a follow up.
Comment 27 Katrin Fischer 2013-10-05 21:22:56 UTC Comment hidden (obsolete)
Comment 28 Martin Renvoize 2013-10-22 00:05:50 UTC
(In reply to Katrin Fischer from comment #26)
> Hm, bit confused about the example values: and|And|or|Or
> 
> 1) Do we need 'And' and 'and' when the values are now case insensitive?
> >I've now taken this into account too, making it case insensitive was a great >idea!
> 
> 2) Why not list 'not'?
> 
> I will continue to test, this could go into a follow up.

Hmmm, it's passed QA now, but I was intending on posting a followup for Katrin's comments.  The sample that should go into the sql would probably be best as 'and|or|not' now that I've made it case insensative and the 'not' is a good addition that I just hadn't thought of before ;)

Either way, that's very trivial and not worth losing QA for :)
Comment 29 Katrin Fischer 2013-10-27 14:39:07 UTC Comment hidden (obsolete)
Comment 30 Katrin Fischer 2013-10-27 14:39:45 UTC
Hi Martin, could you take a look at my follow-up and sign-off on it if it's ok?
Comment 31 Katrin Fischer 2013-10-27 18:46:33 UTC
Hm, I think we will also need a follow up for the Bootstrap OPAC.
Comment 32 Martin Renvoize 2013-10-28 11:24:54 UTC Comment hidden (obsolete)
Comment 33 Martin Renvoize 2013-10-28 12:20:06 UTC Comment hidden (obsolete)
Comment 34 Katrin Fischer 2013-10-28 22:07:17 UTC Comment hidden (obsolete)
Comment 35 Jonathan Druart 2013-10-29 09:00:53 UTC
QA comment:
The highlight does not work at all on the detail page with the bootstrap theme (caused by a JS error: q_array[x] = q_array[x]toLowerCase();).

I think the change should be done in the opac-results-grouped template file too.
Maybe should you include this function into a js file in order to avoid a duplication of code.

Marked as Failed QA.
Comment 36 Katrin Fischer 2013-10-29 09:04:21 UTC
Hi Jonathan, it worked for me yesterday - but i was not using the grouped template and was not aware it's currently used.
Comment 37 Jonathan Druart 2013-10-29 09:07:59 UTC
(In reply to Katrin Fischer from comment #36)
> Hi Jonathan, it worked for me yesterday - but i was not using the grouped
> template and was not aware it's currently used.

The opac-detail cannot work, a dot is missing in the JS code:
  +                q_array[x] = q_array[x]toLowerCase();

The template seems to be used if the pref OpacGroupResults is enabled.
Comment 38 Katrin Fischer 2013-10-29 09:13:48 UTC
Ah you are right - I forgot to test the highlighting on the detail page :( Just tested results - thx Jonathan!
Comment 39 Martin Renvoize 2013-10-29 09:14:38 UTC
Pants, there's always a typo.. I must have been in ccsr instead of bootstrap.  Now I feel silly!
Comment 40 Martin Renvoize 2013-10-29 09:21:33 UTC Comment hidden (obsolete)
Comment 41 Owen Leonard 2013-11-18 17:50:54 UTC Comment hidden (obsolete)
Comment 42 Martin Renvoize 2013-11-19 12:11:15 UTC Comment hidden (obsolete)
Comment 43 Martin Renvoize 2013-11-19 12:12:57 UTC
Added a follow up patch to add the feature to opac-results-grouped templates as requested.

I'm working on a further follow-up to tidy the code out into a manageable file now.
Comment 44 Martin Renvoize 2013-11-19 12:52:53 UTC
Jonathan, could you test that last patch for me?  I'm confident it should work, but I don't have any systems with a working pazpar config to test upon.

Martin
Comment 45 Martin Renvoize 2013-11-19 13:12:49 UTC Comment hidden (obsolete)
Comment 46 Jonathan Druart 2013-11-19 14:58:23 UTC
(In reply to Martin Renvoize from comment #44)
> Jonathan, could you test that last patch for me?  I'm confident it should
> work, but I don't have any systems with a working pazpar config to test upon.

Sorry Martin but I don't have pazpar2 configured.
I tested all pages (except opac-results-grouped.tt), and all works great. Maybe the refactoring could be done in another report in order not to block this one.
Comment 47 Martin Renvoize 2013-11-19 16:23:52 UTC
Comment on attachment 23027 [details] [review]
Bug 6149: Follow-up - Stopwords for Result Highlighting

Moved last patch (re-factoring) into separate bug. (bug 11270)
Comment 48 Jonathan Druart 2013-11-21 15:01:18 UTC
Thanks Martin.
The last patch modifies a page I cannot test (opac-results-grouped), so I cannot pass QA on it.
Given that neither you nor me are tested this patch, I propose either someone (with pazpar2 configured) signs off this last patch or someone else does qa on it.
Comment 49 Katrin Fischer 2013-11-21 15:06:35 UTC
I am not sure pazpar2 is actually functional at this point in time, so I am not sure the change should block this from going in.

If I just turn on OpacGroupResults I get a perl error in OPAC:
Fehler:
Could not find opac-search.xml in /usr/share/koha/opac/cgi-bin/opac/ at /usr/share/koha/lib/C4/Search.pm line 689 

Maybe we could agree on having the first 3 patches go in and leaving the third on the bug? OpacGroupResults
Comment 50 Jonathan Druart 2013-11-21 15:26:43 UTC
Agreed!
Comment 51 Jonathan Druart 2013-11-21 15:27:37 UTC
Note the highlight does not work on the catalogue detail page (not a regression).
3 first patches marked as Passed QA.
Comment 52 Jonathan Druart 2013-11-21 15:28:01 UTC Comment hidden (obsolete)
Comment 53 Jonathan Druart 2013-11-21 15:28:09 UTC Comment hidden (obsolete)
Comment 54 Jonathan Druart 2013-11-21 15:28:15 UTC Comment hidden (obsolete)
Comment 55 Galen Charlton 2014-03-10 21:41:27 UTC
Think on the name of the sysprefs: HighlightedStopWords.

A user could be excused for thinking that it was the name of stopwords that /should/ be highlighted.  So could a developer maintaining this in the future.

WordsNotToHighlightInSearchResults is closer to the mark, although I'm open to a less verbose way of saying it.

In any event, please resubmit with a better name.

I have no other serious objection to the patch, though if you think of searching for titles like "Harry potter and the goblet of fire", I don't really consider it much of a win.
Comment 56 Martin Renvoize 2014-03-11 09:09:56 UTC Comment hidden (obsolete)
Comment 57 Martin Renvoize 2014-03-11 09:14:44 UTC
Submitted followup as requested.  I think the name is suitable descriptive whilst not being overly verbose now, though am happy to change if advised.

I agree, it's a pretty trivial solution, and could probabylbe implimetned more thoroughly given a rewrite of the highlighter itself... but it does solves the imediate problem for a number of our customers.
Comment 58 Owen Leonard 2014-03-14 16:45:16 UTC
This is not working for me, I think because there is some mixup with the preference name. It appears that updatedatabase.pl at the very least suffers from this.
Comment 59 Martin Renvoize 2014-03-17 08:32:04 UTC
Hmm, that's interesting.. The only follow-up I did was a mas find/replace on that syspref name as per Galen request.  I can't find any mention of the wrong name in the codebase now?

I'll dig a little further
Comment 60 Martin Renvoize 2014-07-26 13:00:45 UTC Comment hidden (obsolete)
Comment 61 Martin Renvoize 2014-07-26 13:00:59 UTC Comment hidden (obsolete)
Comment 62 Martin Renvoize 2014-07-26 13:01:08 UTC Comment hidden (obsolete)
Comment 63 Martin Renvoize 2014-07-26 13:01:18 UTC Comment hidden (obsolete)
Comment 64 Martin Renvoize 2014-07-26 13:06:37 UTC
Re-based upon current master, though with the imminent removal of CCSR and prog I'm thinking I should factor those two bits of the patch out now.

I still intend, but have no idea if I'll ever get around to it, to factor out the highlighting code so it's more easily applied across templates with just an include.  I'd also like to update the jquery plugin (either to v4 from v3.. or to  http://bartaz.github.io/sandbox.js/jquery.highlight.html fork), and add some ajax cleverness so that instead of having to create a list of stopwords (though that may still be useful for some other cases) we could get a more accurate set of search terms without operators back from the search script itself)

I don't see why this one should get held up much further though.. it still works.
Comment 65 Martin Renvoize 2014-07-26 13:27:36 UTC Comment hidden (obsolete)
Comment 66 Martin Renvoize 2014-07-26 13:27:41 UTC Comment hidden (obsolete)
Comment 67 Martin Renvoize 2014-07-26 13:27:46 UTC Comment hidden (obsolete)
Comment 68 Martin Renvoize 2014-07-26 13:27:51 UTC Comment hidden (obsolete)
Comment 69 Martin Renvoize 2014-07-26 13:27:56 UTC Comment hidden (obsolete)
Comment 70 Katrin Fischer 2014-08-15 12:39:08 UTC
Sorry to have to add a comment 70 to this, but it doesn't work in Bootstrap for me. I tried with der|die|das and it still highlights them in the bootstrap theme.
Comment 71 Martin Renvoize 2014-08-15 13:08:39 UTC Comment hidden (obsolete)
Comment 72 Katrin Fischer 2014-08-15 15:46:52 UTC
Created attachment 30842 [details] [review]
[PASSED QA] Bug 6149 - Stopwords for Result Highlighting

This patch adds a system preference to control stopwords used to
prevent operators and other 'minor' words from being highlighted
in search results when the OpacHighlightWords syspref is enabled

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Works as advertised, I fixed the updatedatabase to use XXX so it won't
clash as much

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixed a conflict in updatedatabase.pl.
Also fixed tabs in opac-detail.tt

Feature passes all tests and QA script now.
Tested in intranet and OPAC with different words and searches.
Works on results pages and OPAC detail page.
Highlighting and unhighlighting still works correctly.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as expected.
Comment 73 Katrin Fischer 2014-08-15 15:46:57 UTC
Created attachment 30843 [details] [review]
[PASSED QA] Bug 6149: Follow-up [defaults] - Stopwords for Result Highlighting

- changed sample words to and|or|not in sysprefs.sql and
  updatedatabase
- changed systempreference name from OpacHighlightedStopwords
  to HighlightedStopwords, as it also works for the staff
  results page

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 74 Katrin Fischer 2014-08-15 15:47:01 UTC
Created attachment 30844 [details] [review]
[PASSED QA] Bug 6149: Follow-up [bootstrap] - Stopwords for Result Highlighting

- Added functionality to new bootstrap theme

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 75 Katrin Fischer 2014-08-15 15:47:05 UTC
Created attachment 30845 [details] [review]
[PASSED QA] Bug 6149: Follow-up [grouped] - Stopwords for Result Highlighting

- Added functionaility to opac-results-grouped page

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 76 Katrin Fischer 2014-08-15 15:47:10 UTC
Created attachment 30846 [details] [review]
[PASSED QA] Bug 6149 - Follow-up [syspref] - Stopwords for Result Highlighting

- global replaced HightedStopWords syspref with NotHightedWords for
  clarification purposes. Hopefully this is a bit better and still
  not too verbose.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, fixed some tabs and a typo.
Comment 77 Katrin Fischer 2014-08-15 15:49:47 UTC
Patches also change the old prog theme, but changes are small, bug report is old and has gone through a lot of iterations already, and we are going to remove the templates soon ...I am going to let it pass.
Comment 78 Tomás Cohen Arazi 2014-09-05 14:34:40 UTC
Created attachment 31403 [details] [review]
Bug 6149: (qa followup) sysprefs should be alphabetically sorted

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Comment 79 Tomás Cohen Arazi 2014-09-05 14:38:11 UTC
Patches pushed to master.

Thanks Martin!