I have a database of my books; “Book” is a data type with a text field for “author name” and a numeric range for “hours to read,” among other fields.
I want to find a book by “Jane Smith” that takes 7 hours to read.
There are 3 Jane Smith titles in my database:
- Book A takes 2-3 hours to read
- Book B takes 4-6 hours to read
- Book C takes 9-12 hours to read
I want my app to return a result that’s says: your request is between Book B and Book C, but it’s closer to Book B.