FindOptions.ThresholdScore Property
FindOptions.ThresholdScore Property
The score below which results should not be returned. The valid range is 0 through 1 (worst to best).
Public ThresholdScore As System.Double = 0.85
[C#]
public System.Double ThresholdScore;
Remarks
The ThresholdScore property default is the MapPointConstants.FindScoreThreshold property (0.85).
The FindResult.Score property identifies a find result in terms of how well it matches the search criteria.
If the find results do not include the entities you expect, try lowering the ThresholdScore property. Set it to 0 to return all results. For example, to find the 50 U.S. states, set the FindSpecification.EntityTypeNames property to "AdminDivision1", the SearchContext property to "244", and the ThresholdScore property to "0".
The ThresholdScore property is ignored when passed for the points of interest find methods (FindServiceSoap.FindByID, FindServiceSoap.FindByProperty, FindServiceSoap.FindNearby and FindServiceSoap.FindNearRoute).
Example
[Visual Basic]
'Return all results
Dim findSpec As New FindSpecification()
findSpec.DataSourceName = "MapPoint.NA"
findSpec.InputPlace = "Seattle, WA"
findSpec.Options = New FindOptions()
findSpec.Options.ThresholdScore = 0
Dim foundResults As FindResults
foundResults = findService.Find(findSpec)
Dim fr As FindResult
For Each fr In foundResults.Results
Console.WriteLine(fr.FoundLocation.Entity.DisplayName)
Next
[C#]
//Return all results
FindSpecification findSpec = new FindSpecification();
findSpec.DataSourceName = "MapPoint.NA";
findSpec.InputPlace = "Seattle, WA";
findSpec.Options = new FindOptions();
findSpec.Options.ThresholdScore = 0;
FindResults foundResults;
foundResults = findService.Find(findSpec);
foreach(FindResult fr in foundResults.Results)
{
Console.WriteLine(fr.FoundLocation.Entity.DisplayName);
}
See Also
FindOptions Class | MapPointConstants.FindScoreThreshold Property | FindResult.Score Property | FindNearbySpecification.Options Property