Bug 8206

Summary: Add additional search options to authority browser in OPAC
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: OPACAssignee: Jared Camins-Esakov <jcamins>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer, m.de.rooy, paul.poulain
Version: 3.10   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 8212    
Attachments: Bug 8206: Specify index in OPAC authority search
Bug 8206: Specify index in OPAC authority search
Bug 8206: Specify index in OPAC authority search
[SIGNED-OFF] Bug 8206: Specify index in OPAC authority search
Bug 8206 follow-up: Add Match index to MARC21 record.abs
Bug 8206: make authority search indexes consistent
[SIGNED-OFF] Bug 8206: Specify index in OPAC authority search
[SIGNED-OFF] Bug 8206 follow-up: Add Match index to MARC21 record.abs
[SIGNED-OFF] Bug 8206: make authority search indexes consistent

Description Jared Camins-Esakov 2012-06-07 13:43:15 UTC
The OPAC authority browser used to have several boxes for the different types of authority searches that are possible. This was confusing to users, and rather ugly. However, the additional options were useful for libraries with massive authority files. I propose adding a dropdown to the authority search page on the OPAC which can be easily hidden using CSS, but offers the option to choose whether to look in main entries, headings, or anywhere.
Comment 1 Jared Camins-Esakov 2012-06-13 23:28:53 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2012-06-15 14:41:14 UTC
New search option "in see from headings" does not work for me. Talking to Jared it probably needs a follow-up - failing QA for the moment.
Comment 3 Jared Camins-Esakov 2012-06-15 17:05:30 UTC Comment hidden (obsolete)
Comment 4 Jared Camins-Esakov 2012-06-15 18:44:25 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2012-06-16 09:38:53 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2012-07-05 13:02:08 UTC
No results for 1=Match.
Error 114 in zebra log. No match for Match :-) in bib1.att
Needs some attention still
Comment 7 Jared Camins-Esakov 2012-07-05 13:19:29 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2012-07-05 13:29:42 UTC
Back to Signed Off
Will be looking soon
Comment 9 Marcel de Rooy 2012-07-10 14:53:34 UTC
Good to see the additional patch.
I did an install to ensure that I have all Zebra files and of course (an init) and a reindex.
I searched through authorities in opac and staff (hoping to have the same results) and I checked what I did in the zebra log file.
And - not unimportant - I chose for grs1 (you tested dom already :-)
All this brings me to the following questions:

1 Since not all fields from the framework come back in record.abs, what actually is the promise of "Any"? Note that any is used in OPAC's Keyword and Staff's All Headings. This is confusing to me too.. 
2 Even more confusing is that OPAC's All Headings maps to Match, while the staff does not use Match.
3 Staff uses Heading-Main for Search Authorities; OPAC does not use Heading-Main.
4 You also added Match-heading to the config files. I also see it in AuthoritiesMarc.pm. But how/when do I actually use it? The difference between Heading and Heading-Main, as well as Match and Match-heading is unclear to me.

From a user point of view, I would recommend searching from most results ("any") to least results ("main entry") in the same Zebra indexes in both OPAC and staff. The current situation (with and without your patch) is confusing. To be consistent, we should use the same terms and same indexes.
Although you could argue that we go outside the scope of this report, I like to ask if we could resolve this now too?

Parking at Failed QA for discussion/correction etc.
Comment 10 Jared Camins-Esakov 2012-07-15 13:41:36 UTC Comment hidden (obsolete)
Comment 11 Jared Camins-Esakov 2012-07-15 13:44:13 UTC
Marking signed off manually because I didn't remember to use git-bz to do it. Marcel, if you would like another sign off on this, please set this back to Needs signoff. I was unsure whether this should still be considered signed off since the second follow-up is only to address your QA concerns.
Comment 12 Marcel de Rooy 2012-07-16 08:10:49 UTC
Cannot test this properly now. Installation is broken by 8268.
Comment 13 Marcel de Rooy 2012-07-25 14:18:18 UTC
(In reply to comment #12)
> Cannot test this properly now. Installation is broken by 8268.

Well, will continue here now. Changing status and will hopefully be adding a signoff to the two followup patches.
Comment 14 Marcel de Rooy 2012-07-25 15:16:03 UTC
The three searches in opac and staff now are using the same indexes. That's fine!
Unfortunately, this error comes up on some of the searches in opac and staff (especially on Any):
Can't call method "data" on an undefined value at /usr/share/koha/testclone/C4/AuthoritiesMarc.pm line 335

Note that our records should contain an id in 001!
And I did an init + a reindex on the complete zebra db.

When testing with yaz-client, I get back a number of hits from zebra, but if I want to show a record, it gives:
[14] System error in presenting records -- v2 addinfo 'Could not handle record type grs.marcxml.record'
And strange enough, I come across a few lines like below in zebra_log (referring not to 14 but 13..):
16:45:48-25/07 zebrasrv(14) [request] Present ERROR 13  2 1+1

If you have additional info, you are welcome ;) What I will do next but later, is init, reindex etc. without these patches. This error may be in master already..

Tested with Zebra 2.0.50 btw.
Comment 15 Marcel de Rooy 2012-07-30 11:57:09 UTC
(In reply to comment #14)
> If you have additional info, you are welcome ;) What I will do next but
> later, is init, reindex etc. without these patches. This error may be in
> master already..

Going further here. Seem to have resolved the zebra problem now while having installed another instance and shifting master..
Comment 16 Marcel de Rooy 2012-07-30 12:26:12 UTC
OPAC seems to work fine.
Staff still has one small presentation problem:
Results table contains Summary: HASH(0x3cf6b78)
Comment 17 Marcel de Rooy 2012-07-30 12:28:38 UTC
(In reply to comment #16)
> OPAC seems to work fine.
> Staff still has one small presentation problem:
> Results table contains Summary: HASH(0x3cf6b78)

This comes from somewhere else, not these 3 patches. But should be fixed, isn't it?
Comment 18 Jared Camins-Esakov 2012-07-30 13:20:27 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > OPAC seems to work fine.
> > Staff still has one small presentation problem:
> > Results table contains Summary: HASH(0x3cf6b78)
> 
> This comes from somewhere else, not these 3 patches. But should be fixed,
> isn't it?

I am fixing this on another bug, but what is the problem with this patch that caused it to fail QA?
Comment 19 Marcel de Rooy 2012-07-30 13:24:14 UTC
(In reply to comment #18)
> I am fixing this on another bug, but what is the problem with this patch
> that caused it to fail QA?
No problem, but the other bug just obscures test results. Please let me know when that is fixed. I will then finish my test for this one, and upgrade its status. Thanks.
Comment 20 Marcel de Rooy 2012-08-02 08:24:31 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > I am fixing this on another bug, but what is the problem with this patch
> > that caused it to fail QA?

Jared, could you please look at bug 8555? Just a quick fix. If you agree, please sign off on it..
Comment 21 Marcel de Rooy 2012-08-23 09:39:00 UTC
Created attachment 11769 [details] [review]
[SIGNED-OFF] Bug 8206: Specify index in OPAC authority search
Comment 22 Marcel de Rooy 2012-08-23 09:39:55 UTC
Created attachment 11770 [details] [review]
[SIGNED-OFF] Bug 8206 follow-up: Add Match index to MARC21 record.abs
Comment 23 Marcel de Rooy 2012-08-23 09:40:45 UTC
Created attachment 11771 [details] [review]
[SIGNED-OFF] Bug 8206: make authority search indexes consistent
Comment 24 Marcel de Rooy 2012-08-23 09:45:24 UTC
QA Comment: With some delay, but looks fine to me. Works well.

Tested marc21 dom and grs1. Looked at unimarc grs1. Seems that normarc dom and unimarc dom are not used for authorities..

Passed QA
Comment 25 Marcel de Rooy 2012-08-23 09:47:18 UTC
Jared,
While testing dom for this report, I had the following one error during a zebra reindex:

10:47:52-23/08 zebraidx(17048) [warn] Unknown register type:

The error does not list the type it refers to. Any idea? 
Seems not to be related to this report.
Comment 26 Paul Poulain 2012-09-07 13:29:36 UTC
Patch pushed to master

Agreed the new behaviour is OK. (our idea when updating opac- was to get rid of those terms that students/patrons don't understand. You reintroduce some terms, but it's *much* smoother than the initial version, and a few CSS can always hide that)
Comment 27 Jared Camins-Esakov 2012-12-03 13:27:23 UTC
This feature is available in Master.