then, this will sort the documents in descending score order. The scores
will be positive. If you want to sort in ascending order, then use the
following code:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003e\u003ccode\u003eRescoringMatchScorer\u003c/code\u003e assigns document scores based on term frequency weighted by document parts.\u003c/p\u003e\n"],["\u003cp\u003eIt is used within \u003ccode\u003eSortOptions\u003c/code\u003e to sort documents, typically in descending order by score.\u003c/p\u003e\n"],["\u003cp\u003eSorting in ascending order with \u003ccode\u003eRescoringMatchScorer\u003c/code\u003e requires defining a \u003ccode\u003eSortExpression\u003c/code\u003e with the direction as \u003ccode\u003eASCENDING\u003c/code\u003e and a default value.\u003c/p\u003e\n"],["\u003cp\u003eUsing the \u003ccode\u003eRescoringMatchScorer\u003c/code\u003e can potentially raise \u003ccode\u003eTypeError\u003c/code\u003e if parameters are invalid types or an unknown attribute is passed, or a \u003ccode\u003eValueError\u003c/code\u003e if the parameter has an invalid value.\u003c/p\u003e\n"]]],[],null,["# google.appengine.api.search.RescoringMatchScorer\n\n\u003cbr /\u003e\n\nAssigns a document score based on term frequency weighted by doc parts.\n\nInherits From: [`MatchScorer`](../../../../google/appengine/api/search/MatchScorer), [`expected_type`](../../../../google/appengine/api/validation/Validator/expected_type)\n\n#### View aliases\n\n\n**Main aliases**\n\n\\`google.appengine.api.search.search.RescoringMatchScorer\\`\n\n\u003cbr /\u003e\n\n google.appengine.api.search.RescoringMatchScorer()\n\nIf you add a RescoringMatchScorer to a SortOptions as in the following code: \n\n sort_opts = search.SortOptions(match_scorer=search.RescoringMatchScorer())\n\nthen, this will sort the documents in descending score order. The scores\nwill be positive. If you want to sort in ascending order, then use the\nfollowing code: \n\n sort_opts = search.SortOptions(match_scorer=search.RescoringMatchScorer(),\n expressions=[search.SortExpression(\n expression='_score', direction=search.SortExpression.ASCENDING,\n default_value=0.0)])\n\nThe scores in this case will be negative.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]