Currently we send "onloan:0" to ES to get records with available items. But ES 6 does not considers 0 as a valid boolean. On ES 6.x: onloan:0 => doesn't work onloan:false => works On ES 5.x: onloan:0 => works onloan:false => works So it seems we can have compatibility for both ES 5 and ES 6 by using false instead of 0. Patch is coming.
Created attachment 89506 [details] [review] Bug 22874 - use false instaed of 0 value for limiting on availability Test plan - Set up a elasticsearch 6 instance to work with Koha, - you may need to make koha works with ES 6 (see bug 20589), - make a search and limit it to available items only, => no result - Apply this patch, - make a search and limit it to available items only, - you should get some results - Do the same with ES 5.x
Here are the 2 sandboxes I used with : - ES5 : http://pro.es5-koha.sandbox.biblibre.eu - ES6 : http://pro.es6-koha.sandbox.biblibre.eu Sorry Alex, they both failed...
Patch tested with a sandbox, by Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 93359 [details] [review] Bug 22874 - use false instaed of 0 value for limiting on availability Test plan - Set up a elasticsearch 6 instance to work with Koha, - you may need to make koha works with ES 6 (see bug 20589), - make a search and limit it to available items only, => no result - Apply this patch, - make a search and limit it to available items only, - you should get some results - Do the same with ES 5.x Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 94792 [details] [review] Bug 22874: Use false instaed of 0 value for limiting on availability Test plan - Set up a elasticsearch 6 instance to work with Koha, - you may need to make koha works with ES 6 (see bug 20589), - make a search and limit it to available items only, => no result - Apply this patch, - make a search and limit it to available items only, - you should get some results - Do the same with ES 5.x Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Nice work! Pushed to master for 19.11.00