- Issue created by @longwave
- Status changed to Closed: works as designed
over 1 year ago 3:56pm 8 May 2023 - 🇦🇹Austria drunken monkey Vienna, Austria
Thanks for reporting this problem!
However, this seems to be a very specific problem, and more or less expected behavior. It’s your own responsibility to not set a date field that might be in the future as the “Method for determining new results” option.
On your own site, you can also fix this by just altering the executed search query – though, admittedly, not through the usualsearch_api.query_pre_execute
event, but only through a backend-dependent one. - Status changed to Active
over 1 year ago 2:10pm 10 May 2023 - 🇬🇧United Kingdom stewsnooze
I'm not sure I agree with that. Even the function name is called getNewResults() but will actually always provide all future results. Thus meaning that this module will not alert you once to a new result which it claims to do.
Later on in the module on line 294 there is code to force a return of the result set which I think may be the reason we always get the returned set rather than only new results that haven't been saved into saveKnownResults()
// Same when we used a date field, but in this case with results. if ($date_field) { return $results; }
If you are not against it I still think there is a completely valid case where some work could be done here to ensure the result set should not constantly have future dates items. We are happy to do the work but I do think this is a valid use case to strengthen the module.
- 🇦🇹Austria drunken monkey Vienna, Austria
OK, you’re still not convincing me this is a bug, but I guess it would be OK as a feature request, if we make it optional. (I.e., with a setting on the saved search type form.) If you’re prepared to provide a patch/MR for that, including tests, then I’d be willing to review and merge it.