Apologies if I'm not following correct procedure. I commented on another issue here but its marked as fixed, so I thought maybe I should start a new issue.

It's the same problem mentioned in that thread: the facets don't display correctly when searching for multiple words. Not only are the counts wrong (all of them are "1"), but some facets don't display all options that have results.

I can't help with coding, but I'm happy to do whatever I can to diagnose the problem!

Thanks!

Comments

drunken monkey’s picture

Filing a new issue here was the right thing to do, I think. In general, posting into an existing issue is preferred, but if it's already closed you need to re-open it (set the status to "Active" again), otherwise it's unlikely that anyone would see your new comment.
However, in this case the issue is also rather old, so creating a new one is probably better.

Yes, the linked issue was committed and the problem fixed. However, it seems we inadverdently reverted that fix in #1299238: Add option for partial matching. I posted there to discuss why this was done or whether it was just a mistake.

In any case, the attached patch should fix this. I also included a regression test to make sure this doesn't happen again.
Please test!

Status: Needs review » Needs work

The last submitted patch, 1: 2286329-1--multi_word_searches_with_facets.patch, failed testing.

drunken monkey’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
Status: Needs work » Needs review
drunken monkey’s picture

I hate this "feature".

lesliewagner1165’s picture

Thanks so much for the fix!

Now I just need some help on how to get the code into my site. (I know next to nothing about coding, and am terrified of messing things up!) Where might I go for explicit instructions? (I'm talking "explain this to me like I'm a fourth grader" instructions!)

Thanks

jibize’s picture

Thanks drunken monkey! working great for me.

@lesliewagner1165 checkout https://www.drupal.org/patch/apply for info on how to apply a path.

jibize’s picture

Humm sorry spoke to fast, there are still some discrepancies between the facets and the result number. I haven't figure out why it is not always working as expected but I will keep digging.

jibize’s picture

Actually there was a problem with my search index. Patch working great! ;-)

Johnny vd Laar’s picture

Status: Needs review » Reviewed & tested by the community

As far as I can see it doesn't break anything for me.

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

OK, great to hear. Thank you all for testing!
Committed.

  • drunken monkey committed d4cf8a3 on 7.x-1.x
    Issue #2286329 by drunken monkey: Fixed incorrect facet counts for multi...

Status: Fixed » Closed (fixed)

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

drunken monkey’s picture

Project: Search API Database Search » Search API
Version: 7.x-1.x-dev » 8.x-1.x-dev
Component: Code » Database backend
Status: Closed (fixed) » Patch (to be ported)

Needs to be ported to D8.

drunken monkey’s picture

Issue tags: +Novice
rosinegrean’s picture

Assigned: Unassigned » rosinegrean
Status: Patch (to be ported) » Needs review
StatusFileSize
new1.08 KB

As I see it, only the regression test needs to be ported.

Status: Needs review » Needs work

The last submitted patch, 15: 2286329-15--multi_word_searches_with_facets.patch, failed testing.

The last submitted patch, 15: 2286329-15--multi_word_searches_with_facets.patch, failed testing.

rosinegrean’s picture

Status: Needs work » Needs review
StatusFileSize
new1.19 KB
new1.02 KB

Status: Needs review » Needs work

The last submitted patch, 18: 2286329-18--multi_word_searches_with_facets.patch, failed testing.

rosinegrean’s picture

Status: Needs work » Needs review
StatusFileSize
new1.22 KB
new491 bytes
drunken monkey’s picture

Status: Needs review » Fixed

Looks good, thanks a lot!
Committed.

  • drunken monkey committed 5fac71c on 8.x-1.x authored by prics
    Issue #2286329 by prics: Fixed incorrect facet counts in multi-word...

Status: Fixed » Closed (fixed)

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