Browse Source

boost phrase matching

phrase_slop_disable_tf_idf
Peter Johnson 9 years ago
parent
commit
29ef42e290
  1. 3
      query/search.js
  2. 15
      test/unit/query/search.js

3
query/search.js

@ -117,7 +117,8 @@ function generate( params ){
'query': input,
'analyzer': 'peliasPhrase',
'type': 'phrase',
'slop': 2
'slop': 2,
'boost': 2
}
}
});

15
test/unit/query/search.js

@ -92,7 +92,8 @@ var expected = {
'query': 'test',
'analyzer': 'peliasPhrase',
'type': 'phrase',
'slop': 2
'slop': 2,
'boost': 2
}
}
}]
@ -182,7 +183,8 @@ module.exports.tests.query = function(test, common) {
'query': 'test',
'analyzer': 'peliasPhrase',
'type': 'phrase',
'slop': 2
'slop': 2,
'boost': 2
}
}
}]
@ -230,7 +232,8 @@ module.exports.tests.query = function(test, common) {
'query': 'test',
'analyzer': 'peliasPhrase',
'type': 'phrase',
'slop': 2
'slop': 2,
'boost': 2
}
}
}]
@ -323,7 +326,8 @@ module.exports.tests.query = function(test, common) {
'query': '123 main st',
'analyzer': 'peliasPhrase',
'type': 'phrase',
'slop': 2
'slop': 2,
'boost': 2
}
}
}
@ -480,7 +484,8 @@ module.exports.tests.query = function(test, common) {
'query': 'soho grand',
'analyzer': 'peliasPhrase',
'type': 'phrase',
'slop': 2
'slop': 2,
'boost': 2
}
}
}

Loading…
Cancel
Save