Enable validation checks on JSON files

This commit is contained in:
Shalin Shekhar Mangar 2017-08-12 11:05:19 +05:30
parent 2e519ac955
commit 575eead80f
3 changed files with 67 additions and 47 deletions

View File

@ -138,7 +138,7 @@
'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js', 'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js',
'css', 'xml', 'xsl', 'vm', 'sh', 'cmd', 'bat', 'policy', 'css', 'xml', 'xsl', 'vm', 'sh', 'cmd', 'bat', 'policy',
'properties', 'mdtext', 'properties', 'mdtext',
'template', 'adoc', 'template', 'adoc', 'json',
]; ];
def invalidPatterns = [ def invalidPatterns = [
(~$/@author\b/$) : '@author javadoc tag', (~$/@author\b/$) : '@author javadoc tag',

View File

@ -1,20 +1,25 @@
{ {
"class":"org.apache.solr.ltr.model.LinearModel", "class":"org.apache.solr.ltr.model.LinearModel",
"name":"fqmodel", "name":"fqmodel",
"features":[ "features":[
{ {
"name":"matchedTitle", "name": "matchedTitle",
"norm": { "norm": {
"class":"org.apache.solr.ltr.norm.MinMaxNormalizer", "class": "org.apache.solr.ltr.norm.MinMaxNormalizer",
"params":{ "min":"0.0f", "max":"10.0f" } "params": {
} "min": "0.0f",
}, "max": "10.0f"
{ "name":"popularity"} }
], }
"params":{ },
"weights": { {
"matchedTitle": 0.5, "name": "popularity"
"popularity": 0.5 }
} ],
} "params": {
"weights": {
"matchedTitle": 0.5,
"popularity": 0.5
}
}
} }

View File

@ -1,30 +1,45 @@
{ {
"class":"org.apache.solr.ltr.model.LinearModel", "class": "org.apache.solr.ltr.model.LinearModel",
"name":"6029760550880411648", "name": "6029760550880411648",
"features":[ "features": [
{"name":"title"}, {
{"name":"description"}, "name": "title"
{"name":"keywords"}, },
{ {
"name":"popularity", "name": "description"
"norm": { },
"class":"org.apache.solr.ltr.norm.MinMaxNormalizer", {
"params":{ "min":"0.0f", "max":"10.0f" } "name": "keywords"
} },
}, {
{"name":"text"}, "name": "popularity",
{"name":"queryIntentPerson"}, "norm": {
{"name":"queryIntentCompany"} "class": "org.apache.solr.ltr.norm.MinMaxNormalizer",
], "params": {
"params":{ "min": "0.0f",
"weights": { "max": "10.0f"
"title": 0.0000000000, }
"description": 0.1000000000, }
"keywords": 0.2000000000, },
"popularity": 0.3000000000, {
"text": 0.4000000000, "name": "text"
"queryIntentPerson":0.1231231, },
"queryIntentCompany":0.12121211 {
} "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
}
}
} }