You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/08/12 05:35:35 UTC

lucene-solr:master: Enable validation checks on JSON files

Repository: lucene-solr
Updated Branches:
  refs/heads/master 2e519ac95 -> 575eead80


Enable validation checks on JSON files


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/575eead8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/575eead8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/575eead8

Branch: refs/heads/master
Commit: 575eead80f8b5b798935a02eec212f83690c9cf7
Parents: 2e519ac
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Sat Aug 12 11:05:19 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Sat Aug 12 11:05:19 2017 +0530

----------------------------------------------------------------------
 build.xml                                       |  2 +-
 .../src/test-files/modelExamples/fq-model.json  | 41 ++++++-----
 .../test-files/modelExamples/linear-model.json  | 71 ++++++++++++--------
 3 files changed, 67 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/575eead8/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 79326e9..f2043e2 100755
--- a/build.xml
+++ b/build.xml
@@ -138,7 +138,7 @@
         'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js',
         'css', 'xml', 'xsl', 'vm', 'sh', 'cmd', 'bat', 'policy',
         'properties', 'mdtext',
-        'template', 'adoc',
+        'template', 'adoc', 'json',
       ];
       def invalidPatterns = [
         (~$/@author\b/$) : '@author javadoc tag',

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/575eead8/solr/contrib/ltr/src/test-files/modelExamples/fq-model.json
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/test-files/modelExamples/fq-model.json b/solr/contrib/ltr/src/test-files/modelExamples/fq-model.json
index b5d631f..93e69d7 100644
--- a/solr/contrib/ltr/src/test-files/modelExamples/fq-model.json
+++ b/solr/contrib/ltr/src/test-files/modelExamples/fq-model.json
@@ -1,20 +1,25 @@
 {
-	"class":"org.apache.solr.ltr.model.LinearModel",
-	"name":"fqmodel",
-	"features":[
-        {
-            "name":"matchedTitle",
-            "norm": {
-                "class":"org.apache.solr.ltr.norm.MinMaxNormalizer",
-                "params":{ "min":"0.0f", "max":"10.0f" }
-            }
-        },
-        { "name":"popularity"}
-	],
-	"params":{
-	  "weights": {
-	    "matchedTitle": 0.5,
-	    "popularity": 0.5
-	  }
-	}
+  "class":"org.apache.solr.ltr.model.LinearModel",
+  "name":"fqmodel",
+  "features":[
+    {
+      "name": "matchedTitle",
+      "norm": {
+        "class": "org.apache.solr.ltr.norm.MinMaxNormalizer",
+        "params": {
+          "min": "0.0f",
+          "max": "10.0f"
+        }
+      }
+    },
+    {
+      "name": "popularity"
+    }
+  ],
+  "params": {
+    "weights": {
+      "matchedTitle": 0.5,
+      "popularity": 0.5
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/575eead8/solr/contrib/ltr/src/test-files/modelExamples/linear-model.json
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/test-files/modelExamples/linear-model.json b/solr/contrib/ltr/src/test-files/modelExamples/linear-model.json
index 6b46dca..36d7961 100644
--- a/solr/contrib/ltr/src/test-files/modelExamples/linear-model.json
+++ b/solr/contrib/ltr/src/test-files/modelExamples/linear-model.json
@@ -1,30 +1,45 @@
 {
-	"class":"org.apache.solr.ltr.model.LinearModel",
-	"name":"6029760550880411648",
-	"features":[
-        {"name":"title"},
-        {"name":"description"},
-        {"name":"keywords"},
-        {
-            "name":"popularity",
-            "norm": {
-                "class":"org.apache.solr.ltr.norm.MinMaxNormalizer",
-                "params":{ "min":"0.0f", "max":"10.0f" }
-            }
-        },
-        {"name":"text"},
-        {"name":"queryIntentPerson"},
-        {"name":"queryIntentCompany"}
-	],
-	"params":{
-	  "weights": {
-	    "title": 0.0000000000,
-	    "description": 0.1000000000,
-	    "keywords": 0.2000000000,
-	    "popularity": 0.3000000000,
-	    "text": 0.4000000000,
-	    "queryIntentPerson":0.1231231,
-	    "queryIntentCompany":0.12121211
-	  }
-	}
+  "class": "org.apache.solr.ltr.model.LinearModel",
+  "name": "6029760550880411648",
+  "features": [
+    {
+      "name": "title"
+    },
+    {
+      "name": "description"
+    },
+    {
+      "name": "keywords"
+    },
+    {
+      "name": "popularity",
+      "norm": {
+        "class": "org.apache.solr.ltr.norm.MinMaxNormalizer",
+        "params": {
+          "min": "0.0f",
+          "max": "10.0f"
+        }
+      }
+    },
+    {
+      "name": "text"
+    },
+    {
+      "name": "queryIntentPerson"
+    },
+    {
+      "name": "queryIntentCompany"
+    }
+  ],
+  "params": {
+    "weights": {
+      "title": 0.0000000000,
+      "description": 0.1000000000,
+      "keywords": 0.2000000000,
+      "popularity": 0.3000000000,
+      "text": 0.4000000000,
+      "queryIntentPerson": 0.1231231,
+      "queryIntentCompany": 0.12121211
+    }
+  }
 }