Summary: | Add ability to scan call numbers index/search field | ||
---|---|---|---|
Product: | Koha | Reporter: | Janusz Kaczmarek <januszop> |
Component: | Searching | Assignee: | Janusz Kaczmarek <januszop> |
Status: | Needs documenting --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | lucas, m.de.rooy, nick |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This adds 'call number' to the available search options when using the 'scan indexes' feature from the advanced search page in the staff interface.
|
Version(s) released in: |
24.11.00
|
Circulation function: | |||
Attachments: |
Bug 36991: Add ability to scan call numbers index/search field
Bug 36991: Add ability to scan call numbers index/search field Bug 36991: Add ability to scan call numbers index/search field |
Description
Janusz Kaczmarek
2024-05-29 19:38:53 UTC
Created attachment 167249 [details] [review] Bug 36991: Add ability to scan call numbers index/search field Some libraries ask for the ability to scan/browse the call numbers index. Test plan: ========== 1. Have an installation with items with callnumbers (in ktd with standard test data set: add some callnumbers to the items). 2. Go to Advanced search > More options; choose Call number in the first drop list and mark Scan indexes. Enter one of the call numbers you assigned to the items and perform the search. You should get no results. 3. Apply the pach; restart all; when using ES: koha-elasticsearch --rebuild -r -d kohadev 4. Repeat p. 2. You should get a list with at least one call number. The link should lead you to the record(s) with items with the selected call number. This should work for ES and for Zebra, but for Zebra you would need to replace /etc/koha/zebradb/ccl.properties with the repository version; and you will get one token results on the list, like for other indexes. Created attachment 167266 [details] [review] Bug 36991: Add ability to scan call numbers index/search field Some libraries ask for the ability to scan/browse the call numbers index. Test plan: ========== 1. Have an installation with items with callnumbers (in ktd with standard test data set: add some callnumbers to the items). 2. Go to Advanced search > More options; choose Call number in the first drop list and mark Scan indexes. Enter one of the call numbers you assigned to the items and perform the search. You should get no results. 3. Apply the pach; restart all; when using ES: koha-elasticsearch --rebuild -r -d kohadev 4. Repeat p. 2. You should get a list with at least one call number. The link should lead you to the record(s) with items with the selected call number. This should work for ES and for Zebra, but for Zebra you would need to replace /etc/koha/zebradb/ccl.properties with the repository version; and you will get one token results on the list, like for other indexes. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 985f7391bc..a71ea8f4c4 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -1039,7 +1039,7 @@ stack 1=8018 -Local-classification 1=8022 +#Local-classification 1=8022 What about bib1.att ? att 20 Local-classification att 8022 Local-classification No blocker + 'callnum' => 'local-classification', And yet another one :) Wouldnt something like callnum(ber) not be easier? No blocker Created attachment 173863 [details] [review] Bug 36991: Add ability to scan call numbers index/search field Some libraries ask for the ability to scan/browse the call numbers index. Test plan: ========== 1. Have an installation with items with callnumbers (in ktd with standard test data set: add some callnumbers to the items). 2. Go to Advanced search > More options; choose Call number in the first drop list and mark Scan indexes. Enter one of the call numbers you assigned to the items and perform the search. You should get no results. 3. Apply the pach; restart all; when using ES: koha-elasticsearch --rebuild -r -d kohadev 4. Repeat p. 2. You should get a list with at least one call number. The link should lead you to the record(s) with items with the selected call number. This should work for ES and for Zebra, but for Zebra you would need to replace /etc/koha/zebradb/ccl.properties with the repository version; and you will get one token results on the list, like for other indexes. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Nick, still care to take a quick look at Elastic part ? (In reply to Marcel de Rooy from comment #4) > + 'callnum' => 'local-classification', > > And yet another one :) Wouldnt something like callnum(ber) not be easier? This is for consistency. We have 'callnum' in indexex list in C4::Search, we call it callnum in ccl.properties. Search string for callnumber resulting from advanced search has idx=callnum etc. And internal name of the ES search field is 'local-classification', so we need the mapping. (In reply to Marcel de Rooy from comment #3) > diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties > index 985f7391bc..a71ea8f4c4 100644 > --- a/etc/zebradb/ccl.properties > +++ b/etc/zebradb/ccl.properties > @@ -1039,7 +1039,7 @@ stack 1=8018 > > -Local-classification 1=8022 > +#Local-classification 1=8022 > > What about bib1.att ? > att 20 Local-classification > att 8022 Local-classification > > No blocker This is a good question. The point is that this duplicate in ccl.properties: Local-classification 1=8022 Local-classification 1=20 together with: callnum Local-classification creates problems with scanning. The official id for Local-classification (from LoC) is 20, so I decided to leave 20 and remove 8022. Currently, in Zebra, we index 952 $o with Local-classification index (cf. biblio-zebra-indexdefs.xsl). This means, it is searchable with pqf queries like @attr 1=Local-classification, @attr 1=20 and @attr 1=8022. With the current mapping in ccl.properties search for callnum produces following PQF query (mind "callnum Local-classification" in ccl.properties): @or @attr 1=20 XXX @attr 1=8022 XXX After the removal of 8022 from ccl.properties we get just: @attr 1=20 XXX And this allows for scanning. So, it looks OK, IMO. Or maybe we should remove the 8022 line from bib1? It should not hurt nothing (we do not use 8022 directly). (In reply to Marcel de Rooy from comment #6) > Nick, still care to take a quick look at Elastic part ? Looks good and works for me Pushed for 24.11! Well done everyone, thank you! Enhancement, no 24.05.x backport. |