dulibrarytech / digitaldu-backend

backend app to the DU digital collections repository
Apache License 2.0
1 stars 0 forks source link

Boolean search bug #284

Open freyesdulib opened 1 year ago

freyesdulib commented 1 year ago

jcrs AND "morris fred". Bad request error when clicking next button in search results. Possibly a related problem per David Fasman:

I believe that the AND and OR operators are switched. When you run a search (here is my test), you should theoretically get fewer results as the words increase, although it is in fact the opposite that is happening. So for example, if you search (quotes added for clarity--not actually in the search), "fun," you get 52 results. Add another word, "fun guy" (again not in quotes) and you get 60 results. Add another word, "fun guy basketball" (again not in quotes) and you get 843 results. And finally, another word, "fun guy basketball baseball" (again, no quotes) and you get 1614 results. To my understanding results should not increase, unless there is an invisible OR operator between the words. Basically, you are searching fun OR guy OR basketball OR baseball, when in reality, it should be AND, like fun AND guy AND basketball AND baseball. I hope that makes sense. I was wondering why my search results increased as I added words that should theoretically narrow the query.

kcrowe1981 commented 5 months ago

David and I just chatted about this again, figured a clarification w/some examples would be helpful based on current repository records.

Basically, the "OR" search is "AND"-ing, and I'm not 100% sure the "AND" is working correctly. A similar experiment on the words "fun" and "guy" as David did above provided some similarly wonky results (no records include both words together).