ooookay, wow, what the hell is going on with this?
the attached image is the autocomplete for "@lain" that I get. This is the order of results. To clarify:
1. lain@cyber.ms (no relationship, exact match)
2. Laine@pialle.fr (no relationship, similar match)
3. lain@lain.com (mutual following, exact match)
4. lain@pleroma.soykaf.com (mutual following, exact match)
5. lain@fediffusion.art (following, exact match)
I recreated this in a test case and ran it expecting these results. Except I get different results:
=== Search Results Debug ===
1. lain@lain.com (rank: 2.333333373069763, id: AwtmDkvx8hzBOktYjg)
2. lain@pleroma.soykaf.com (rank: 1.8125000596046448, id: AwtmDkwf64YLQxE7qC)
3. lain@fediffusion.art (rank: 1.609523868560791, id: AwtmDkx14kpvS3OPOS)
4. lain@cyber.ms (rank: 1.3571429252624512, id: AwtmDkvFBLQ1MYYzdA)
5. Laine@pialle.fr (rank: 0.8067227005958557, id: AwtmDkvbA1hbNejHBQ)
Literally the exact order that I want!
Our code is doing the right thing. So why is it not working in practice?
Gay, loud and annoying !
in reply to feld • • •image.png
feld
in reply to Gay, loud and annoying ! • • •@hj so I'm looking at the actual API response now and it's also returning the users in the correct order as well
I think we need to remove any modification of the autocomplete results from PleromaFE because it's tampering with our search rankings
Gay, loud and annoying !
in reply to feld • • •feld
in reply to Gay, loud and annoying ! • • •Gay, loud and annoying !
in reply to feld • • •feld
in reply to Gay, loud and annoying ! • • •feld
in reply to Gay, loud and annoying ! • • •@hj I gutted that, and the comment about not searching if there's a second @ is invalid -- the backend search does support that (I tested)
Now I get proper results!
So my hack at it proved it works right. I'll let you change the code as you see fit.