A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/appengine/docs/legacy/standard/python/search/scoreddocumentclass below:

class ScoredDocument | App Engine standard environment for Python 2

class ScoredDocument

Stay organized with collections Save and categorize content based on your preferences.

Class ScoredDocument represents a scored document returned from a search. You do not build this class explicitly; rather, it is returned as a result of Index.search().

This API is supported for first-generation runtimes and can be used when upgrading to corresponding second-generation runtimes. If you are updating to the App Engine Python 3 runtime, refer to the migration guide to learn about your migration options for legacy bundled services.

ScoredDocument is defined in the google.appengine.api.search module.

Constructor

The constructor for class MatchScorer is defined as follows:

class ScoredDocument(doc_id=None, fields=None, language='en', sort_scores=None, expressions=None, cursor=None, rank=None)

Represents a scored document returned from a search.

Arguments

doc_id

The visible, printable ASCII string identifying the document. Must not begin with '!'. Whitespace is excluded from ids. If no id is provided, the search service will provide one.

fields

An iterable of Field instances representing the content of the document.

language

The two-letter ISO 639.2 language code of the language used in the field values.

sort_scores

The list of scores assigned during sort evaluation. Each sort dimension is included. Positive scores are used for ascending sorts; negative scores for descending.

expressions

The list of computed fields which are the result of expressions requested.

cursor

A cursor associated with the document.

rank

The document rank is used to specify the order this document will be returned in search results, where 0 <= rank <= sys.maxint. If not specified, the number of seconds since 1st Jan 2011 is used. Documents are returned in descending order of the order ID.

Result value

A new instance of class ScoredDocument.

Exceptions

TypeError

If any of the parameters have an invalid type, or an unknown attribute is passed.

ValueError

If any parameter has an invalid value.

Properties

An instance of class ScoredDocument has the following properties:

sort_scores

Returns the list of scores assigned while the API is sorting the results of a search. Each sort dimension is included. Positive scores are used for ascending sorts and negative scores for descending.

expressions

The list of computed fields the result of expression evaluation. For example, the following field expression seeks to compute a snippet field containing HTML snippets extracted from the matching of the query 'good story' in the content field:

FieldExpression(name='snippet', 'snippet("good story", content)')
Given this query, the API would return the following ScoredDocument.expression:
HtmlField(name='snippet', value='that was a good story to finish')
cursor

A cursor associated with a result used as a starting point from which to return the next set of search results. This property will not return unless you set the Index.cursor_type to Index.RESULT_CURSOR; otherwise the property returns be None.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["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-08-07 UTC."],[[["The `ScoredDocument` class represents a scored document returned from a search operation and is not manually constructed but rather received as a result from `Index.search()`."],["It includes properties such as `doc_id`, `fields`, `language`, `sort_scores`, `expressions`, `cursor`, and `rank` which provide details about the document and its ranking."],["The class allows the retrieval of scores generated during the sorting process (`sort_scores`), computed fields from requested expressions (`expressions`), and a cursor for paginated results (`cursor`) if configured."],["If no `doc_id` is specified, one will be assigned by the search service."],["The document's `rank` property determines the order in which it appears in search results, with a higher `rank` meaning the document is returned earlier in the results."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4