Elastic appears to be indexing onloan as a string, but our code assumes it is a boolean.
Created attachment 54490 [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!
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.
Patch tested with a sandbox, by Jennifer Schmidt <jschmidt@switchinc.org>
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>
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.
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
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>
Pushed to master for 16.11!
Pushed to 16.05.x, for 16.05.06 release