Bug 17132 - Availability search broken when using Elastic
Summary: Availability search broken when using Elastic
Status: Pushed to Master
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 18:12 UTC by Kyle M Hall
Modified: 2016-12-14 11:35 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 17132 - Availability search broken when using Elastic (1.18 KB, patch)
2016-08-15 18:13 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17132 - Availability search broken when using Elastic (1.24 KB, patch)
2016-09-06 15:45 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 17132 - Availability search broken when using Elastic (1.30 KB, patch)
2016-11-22 08:59 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2016-08-15 18:12:03 UTC
Elastic appears to be indexing onloan as a string, but our code assumes it is a boolean.
Comment 1 Kyle M Hall 2016-08-15 18:13:42 UTC Comment hidden (obsolete)
Comment 2 J Schmidt 2016-09-06 15:44:26 UTC
I went into the PTFS Sandbox (1) and did a search for 'the' to find items in the test database. I found some titles having status of available.. I then went to "Search the Catalog" and did numerous searches (e.g., The middle east and brazil)...I was able to bring up results (Success). I went under the Advanced Search area and did the same. I was able to again retrieve results successfully. Following the test plan below this bug appears to meet the status of signed off.
Comment 3 PTFS Europe Sandboxes 2016-09-06 15:44:49 UTC
Patch tested with a sandbox, by Jennifer Schmidt <jschmidt@switchinc.org>
Comment 4 PTFS Europe Sandboxes 2016-09-06 15:45:10 UTC
Created attachment 55262 [details] [review]
Bug 17132 - Availability search broken when using Elastic

Elastic appears to be indexing onloan as a string, but our code assumes
it is a boolean.

Test Plan:
1) Ensure you are set up using Elastic as your search engine
2) Search only for available items from the advanced search
3) Note you get no results
4) Apply this patch
5) Re-run the search
6) You should now get results!

Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>
Comment 5 J Schmidt 2016-09-06 15:50:51 UTC
I checked out Once upon a time 39999000016376... to patron aitken, bailey then performed searches as the title is not available and it was retrieved in basic and advanced search (I did a title search using 'the time')... listed correctly as on loan and retrieve other results.
Comment 6 Nick Clemens 2016-10-13 13:25:39 UTC
I can't recreate this, 'false' seems to be acceptable to elastic as a boolean value https://www.elastic.co/guide/en/elasticsearch/reference/current/boolean.html
Comment 7 Jonathan Druart 2016-11-22 08:59:21 UTC
Created attachment 57692 [details] [review]
Bug 17132 - Availability search broken when using Elastic

Elastic appears to be indexing onloan as a string, but our code assumes
it is a boolean.

Test Plan:
1) Ensure you are set up using Elastic as your search engine
2) Search only for available items from the advanced search
3) Note you get no results
4) Apply this patch
5) Re-run the search
6) You should now get results!

Signed-off-by: Jennifer Schmidt <jschmidt@switchinc.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 8 Kyle M Hall 2016-11-22 11:36:40 UTC
Pushed to master for 16.11!
Comment 9 Mason James 2016-12-14 11:35:17 UTC
Pushed to 16.05.x, for 16.05.06 release