Correct Suggest property filter - fixes issue 689

This commit is contained in:
Tom Morris 2013-03-01 22:26:05 -05:00
parent 38a88db58d
commit a2711e4f59
3 changed files with 3 additions and 2 deletions

View File

@ -308,7 +308,7 @@ SchemaAlignmentDialog.UILink.prototype._showPropertySuggestPopup = function(elmt
};
var sourceTypeID = this._parentUINode.getExpectedType();
if (sourceTypeID !== null) {
suggestOptions.filter = '(all type:/type/property (any namespace:/type/object namespace:' + sourceTypeID + '))'
suggestOptions.filter = '(all type:/type/property (should namespace:' + sourceTypeID + '))'
}
input.suggestP(suggestOptions).bind("fb-select", function(e, data) { commitProperty(data); });

View File

@ -245,7 +245,7 @@ ReconStandardServicePanel.prototype._rewirePropertySuggests = function(type) {
} else if (this._isInFreebaseSchemaSpace()) {
var namespace = (type) ? (typeof type == "string" ? type : type.id) : "/common/topic"
inputs.suggestP({
filter : '(all type:/type/property (any namespace:/type/object namespace:' + namespace + '))'
filter : '(should (any namespace:/type/object namespace:' + namespace + '))'
});
}
};

View File

@ -111,6 +111,7 @@ CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) {
{},
$.suggest.suggest.defaults, {
scoring: "schema",
type: "/type/property",
css: { pane: "fbs-pane fbs-pane-property" }
}
)