-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weights ignored? #729
Comments
Yes, the v1.1.0 release changed much of the ranking algorithm. You can see the release notes for this here: https://github.com/CloudCannon/pagefind/releases/tag/v1.1.0 I wouldn't expect the weighting to be quite as dramatically different in your case though — do you have a site you can share and I can take a look? |
Thanks for the answer! That explains my confusion. I try to setup a short example! Is there a better possibility in the new release to put some pages low in priority? |
I tried to create a minimal example but including too few pages didn't show the behaviour I noticed before. Indeed, in this case, 1.0.4 and 1.1.1 show the same sorting. |
I'm going to look at the ranking again in an upcoming release, to resolve some of the current issues around lack of control. I'll update here when I do :) |
I think we're seeing the same issue on our site. We're setting the weight of an h2 to 10 with the expectation to make it show up at the top when the search term exactly matches a word in it. Is this a reasonable expectation in the first place? More details: A user would expect the highlighted page (with weight 10) to be at the top but it shows third The header in question is getting a weight like this: <h2 data-pagefind-weight="10" id="grefs">Grefs</h2> |
Ok, I think I know what the issue is: it appears that the terms that appear in header tags (in our case
Note that the span was already there, I just added a weight to it |
I've updated from 1.0.4 to 1.1.1 and apparently my setup with adding data-pagefind-weight="2" to different elements does not work anymore. My top results in the search are pages that should be low in priority since I gave them weights of 0.01. Did the version change something or is it just my machine?
The text was updated successfully, but these errors were encountered: