Currently, warnings and ignored search keys can only be set on the search result set object – which makes sense conceptually, but less so regarding the workflow, since warnings and ignored search keys are often/mostly already discovered when building the query. Therefore, being able to set the warnings and ignored search keys at that point, too, would make sense.

I think the simplest solution would be to actually create the results object right away in the query class (instead of leaving that to the server's backend plugin, as I think we do currently) and provide a getter for it. A small change, but making things cleaner and simplifying a few parts of our code (like the "Stopwords" processor, which currently has to remember the ignored keys itself and then run on postprocessSearchResults() just to set them on the result set).

Estimated Value and Story Points

This issue was identified as a Beta Blocker for Drupal 8. We sat down and figured out the value proposition and amount of work (story points) for this issue.

Value and Story points are in the scale of fibonacci. Our minimum is 1, our maximum is 21. The higher, the more value or work a certain issue has.

Value:
Story Points:

Comments

drunken monkey created an issue. See original summary.

drunken monkey’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new15.26 KB

This implements the suggested solution of creating the results right in the query.
Makes the interface a bit weird by not having a return value for Backend:search() anymore – but it does clean up several places in the code, so I'd call that an improvement.

Status: Needs review » Needs work

The last submitted patch, 2: 2641396-2--create_results_in_query.patch, failed testing.

The last submitted patch, 2: 2641396-2--create_results_in_query.patch, failed testing.

drunken monkey’s picture

Status: Needs work » Needs review
StatusFileSize
new721 bytes
new15.96 KB

Missed one place in the code.

borisson_’s picture

If the tests are green, I agree with this issue.

  • drunken monkey committed 5633239 on 8.x-1.x
    Issue #2641396 by drunken monkey: Changed the way query result sets are...
drunken monkey’s picture

Status: Needs review » Fixed

OK, great! Thanks for reviewing!
Committed.

drunken monkey’s picture

Issue tags: +DevDaysMilan

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.