如何根据条件在solr中应用boost

时间:2015-09-09 12:36:46

标签: angularjs solr solr-boost

我是solr的新手,我在我的solr中有2个字段说displayName和foodType当前我使用以下代码从angular查询

angular.element.ajax({
                url: "http://dev2.slim.in:8983/solr/food/select",
                data: {
                    "q": "displayName",
                    "wt": "json",
                    "start":0,
                    "rows":200

                },
                traditional: true,
                cache: true,
                async: true,
                dataType: 'jsonp',
                success: function (data) {
                    //and when we get the query back we
                    //stick the results in the scope
                    $scope.$apply(function () {
                        $scope.foodResults = data.response.docs;
                        console.log("result from solr is  ",$scope.foodResults)

                    });
                },
                jsonp: 'json.wrf'
            });

如果与查询匹配的displayName的字段为foodType为indian,那么我想提高它比其他文档更高怎么办???

0 个答案:

没有答案