Bug 31695 - Type standard number is missing field ci_raw in field_config.yaml
Summary: Type standard number is missing field ci_raw in field_config.yaml
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin Somers
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-05 20:17 UTC by Fridolin Somers
Modified: 2023-12-28 20:44 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.05,22.05.13, 21.11.21


Attachments
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml (1.36 KB, patch)
2022-10-05 20:27 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml (1.41 KB, patch)
2023-04-06 11:14 UTC, Kevin Carnes
Details | Diff | Splinter Review
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml (1.41 KB, patch)
2023-04-06 11:19 UTC, Kevin Carnes
Details | Diff | Splinter Review
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml (1.89 KB, patch)
2023-04-13 07:17 UTC, Kevin Carnes
Details | Diff | Splinter Review
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml (1.98 KB, patch)
2023-04-14 06:55 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2022-10-05 20:17:39 UTC
In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.
Comment 2 Fridolin Somers 2022-10-05 20:27:25 UTC
Created attachment 141403 [details] [review]
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml

In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.

Test plan :
1) Use Elasticsearch search engine
2) For authorities, configure a search field with type 'standard number'
3) Go to authorities search
4) Perform a search on an existing value, with 'contains'
=> Result is found with or without patch
5) Perform a search on an existing value, with 'is exactly'
=> Result is found only with patch
Comment 3 David Nind 2022-10-30 19:06:37 UTC
I'm not sure how to do step 2 - happy to test if you can show how to do that.
Comment 4 Fridolin Somers 2022-11-02 07:13:24 UTC
(In reply to David Nind from comment #3)
> I'm not sure how to do step 2 - happy to test if you can show how to do that.

I mean in Administration > Search engine configuration (Elasticsearch) 
In tab Search fields, choose a field and change its type to "Std. Number".
For example "identifier-standard" is already of this type.
In tab Authorities use this search field on some MARC field.

Rebuild authorities index.

And create of edit an authority with this MARC field.
Comment 5 Kevin Carnes 2023-04-06 11:14:23 UTC
Created attachment 149228 [details] [review]
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml

In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.

Test plan :
1) Use Elasticsearch search engine
2) For authorities, configure a search field with type 'standard number'
3) Go to authorities search
4) Perform a search on an existing value, with 'contains'
=> Result is found with or without patch
5) Perform a search on an existing value, with 'is exactly'
=> Result is found only with patch

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Comment 6 Kevin Carnes 2023-04-06 11:19:20 UTC
Created attachment 149231 [details] [review]
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml

In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.

Test plan :
1) Use Elasticsearch search engine
2) For authorities, configure a search field with type 'standard number'
3) Go to authorities search
4) Perform a search on an existing value, with 'contains'
=> Result is found with or without patch
5) Perform a search on an existing value, with 'is exactly'
=> Result is found only with patch

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Comment 7 Katrin Fischer 2023-04-09 12:31:22 UTC
Hi Frido or Kevin,

can you please update/detail the test plan a little?

What I tried without the patch:
* Add 035$a to an authority record with 12345678
* Search for it in staff: entire record, contains = it's found
* Search for it in staff: entire record, is exactly = it's found

There is no standard number option in the index pull down for authorities.
Comment 8 Kevin Carnes 2023-04-13 07:17:19 UTC
Created attachment 149583 [details] [review]
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml

In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.

Test plan :
1) In the staff interface, go to Administration, and search for SearchEngine
2) Make sure that the SearchEngine preference is set to Elasticsearch and save
3) Return to Administration and select "Search engine configuration"
4) Change the type of "Heading-Main" to "Std. Number" and save
5) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
6) Go to the main staff page and select Authorities
7) Search for a heading (e.g. "A Dual-language book")
=> Result is found with or without patch
8) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch
9) Apply the patch
10) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
11) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Comment 9 Marcel de Rooy 2023-04-14 06:55:13 UTC
Created attachment 149642 [details] [review]
Bug 31695: Type standard number is missing field ci_raw in field_config.yaml

In Elasticsearch fields config field_config.yaml, default type as a field 'ci_raw'. This is used for exact search.
This field is missing for type  standard number 'stdno'.

Test plan :
1) In the staff interface, go to Administration, and search for SearchEngine
2) Make sure that the SearchEngine preference is set to Elasticsearch and save
3) Return to Administration and select "Search engine configuration"
4) Change the type of "Heading-Main" to "Std. Number" and save
5) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
6) Go to the main staff page and select Authorities
7) Search for a heading (e.g. "A Dual-language book")
=> Result is found with or without patch
8) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch
9) Apply the patch
10) Rebuild the index (e.g. "koha-elasticsearch --rebuild -d kohadev")
11) Click on the sliders and select "is exactly" for the operator and search
=> Result is found only with patch

Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Tomás Cohen Arazi 2023-04-14 14:36:08 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 11 Matt Blenkinsop 2023-04-18 12:11:47 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 12 Lucas Gass 2023-05-05 22:24:04 UTC
Backported to 22.05.x for upcoming 22.05.13.
Comment 13 Arthur Suzuki 2023-05-23 12:21:59 UTC
applied to 21.11 for 21.11.21