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

@ -3,15 +3,20 @@
"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"} {
"name": "popularity"
}
], ],
"params":{ "params": {
"weights": { "weights": {
"matchedTitle": 0.5, "matchedTitle": 0.5,
"popularity": 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":"keywords"},
{ {
"name":"popularity", "name": "title"
},
{
"name": "description"
},
{
"name": "keywords"
},
{
"name": "popularity",
"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":"text"}, {
{"name":"queryIntentPerson"}, "name": "text"
{"name":"queryIntentCompany"} },
{
"name": "queryIntentPerson"
},
{
"name": "queryIntentCompany"
}
], ],
"params":{ "params": {
"weights": { "weights": {
"title": 0.0000000000, "title": 0.0000000000,
"description": 0.1000000000, "description": 0.1000000000,
"keywords": 0.2000000000, "keywords": 0.2000000000,
"popularity": 0.3000000000, "popularity": 0.3000000000,
"text": 0.4000000000, "text": 0.4000000000,
"queryIntentPerson":0.1231231, "queryIntentPerson": 0.1231231,
"queryIntentCompany":0.12121211 "queryIntentCompany": 0.12121211
} }
} }
} }