-
Notifications
You must be signed in to change notification settings - Fork 590
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
Sort ASC by a field should give results where that field is not present #31637
Comments
Duplicate of #31106
|
This is not the same as #31106. This relates to multi value fields, |
Issue #26681 contained a request for supporting sorting on multivalue attributes. From reference doc (https://docs.vespa.ai/en/reference/sorting.html#multivalue-sort-attribute): When sorting on a multivalue attribute (array or weightedset) one of the values for the document is selected to be used for sorting. Ascending sort order uses the lowest value while descending sort order uses the highest value. A document without any values is considered worse than a document with values, regardless of sort order. doc3 doesn't have any values for title, thus it is considered worse than doc1 and doc2 regardless of sort order. |
Can i raise a request for feature where sorting on multivalued attributes is consistent with single valued attributes i.e for fields where value is not set, those documents should be ranked first in ASC order even if its multivalued attributes. |
Describe` the bug
Sort ASC by a field should order results where that field is not present. But currently sorting by both ASC or DESC gives documents where that field is not present at the last.
To Reproduce
Steps to reproduce the behavior:
doc1
doc2
doc3
select * from sources * where name contains "aditya" order by title ASC limit 10 offset 0;
This returns the docs in order doc2 -> doc1 -> doc3
Expected behavior
The behaviour should be that docs where the field is not present should be ordered first in ascending order.
doc3 -> doc2 -> doc1
Environment (please complete the following information):
Vespa version
8.221.29
The text was updated successfully, but these errors were encountered: