From a2711e4f59e7fc49d3d0a814e404ae31acf39ea7 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 1 Mar 2013 22:26:05 -0500 Subject: [PATCH] Correct Suggest property filter - fixes issue 689 --- .../freebase/module/scripts/dialogs/schema-alignment/ui-link.js | 2 +- .../core/scripts/reconciliation/standard-service-panel.js | 2 +- main/webapp/modules/core/scripts/util/custom-suggest.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/freebase/module/scripts/dialogs/schema-alignment/ui-link.js b/extensions/freebase/module/scripts/dialogs/schema-alignment/ui-link.js index 159de0143..ee1108e6d 100644 --- a/extensions/freebase/module/scripts/dialogs/schema-alignment/ui-link.js +++ b/extensions/freebase/module/scripts/dialogs/schema-alignment/ui-link.js @@ -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); }); diff --git a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js index 5056c5b21..27a328749 100644 --- a/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js +++ b/main/webapp/modules/core/scripts/reconciliation/standard-service-panel.js @@ -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 + '))' }); } }; diff --git a/main/webapp/modules/core/scripts/util/custom-suggest.js b/main/webapp/modules/core/scripts/util/custom-suggest.js index 4a5d52b77..ebc12f500 100644 --- a/main/webapp/modules/core/scripts/util/custom-suggest.js +++ b/main/webapp/modules/core/scripts/util/custom-suggest.js @@ -111,6 +111,7 @@ CustomSuggest.setFreebaseAPIKey = function(freebaseAPIKey) { {}, $.suggest.suggest.defaults, { scoring: "schema", + type: "/type/property", css: { pane: "fbs-pane fbs-pane-property" } } )