Browse Source

Use half boost for partial tokens matched exactly

exact_matches_muted
Julian Simioni 6 years ago
parent
commit
1d601c2d28
No known key found for this signature in database
GPG Key ID: B9EEB0C6EE0910A1
  1. 4
      query/view/boost_exact_matches.js
  2. 2
      test/unit/fixture/autocomplete_boundary_country.js
  3. 2
      test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js
  4. 2
      test/unit/fixture/autocomplete_linguistic_final_token.js
  5. 2
      test/unit/fixture/autocomplete_linguistic_focus.js
  6. 2
      test/unit/fixture/autocomplete_linguistic_focus_null_island.js
  7. 2
      test/unit/fixture/autocomplete_linguistic_multiple_tokens.js
  8. 2
      test/unit/fixture/autocomplete_linguistic_only.js
  9. 2
      test/unit/fixture/autocomplete_with_layer_filtering.js
  10. 2
      test/unit/fixture/autocomplete_with_source_filtering.js

4
query/view/boost_exact_matches.js

@ -45,6 +45,10 @@ module.exports = function( includePartialTokens ){
vsCopy.var('phrase:analyzer').set(searchDefaults['phrase:analyzer']);
vsCopy.var('phrase:field').set(searchDefaults['phrase:field']);
if (includePartialTokens) {
vsCopy.var('phrase:boost').set(searchDefaults['phrase:boost'] * 0.5);
}
// get a copy of only the *complete* tokens produced from the input:name
var tokens = vs.var('input:name:tokens_complete').get();

2
test/unit/fixture/autocomplete_boundary_country.js

@ -28,7 +28,7 @@ module.exports = {
'match': {
'phrase.default': {
'analyzer': 'peliasPhrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'test',
'type': 'phrase'

2
test/unit/fixture/autocomplete_linguistic_bbox_san_francisco.js

@ -22,7 +22,7 @@ module.exports = {
'phrase.default': {
'analyzer': 'peliasPhrase',
'type': 'phrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'test'
}

2
test/unit/fixture/autocomplete_linguistic_final_token.js

@ -26,7 +26,7 @@ module.exports = {
'match': {
'phrase.default': {
'analyzer': 'peliasPhrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'one t',
'type': 'phrase'

2
test/unit/fixture/autocomplete_linguistic_focus.js

@ -21,7 +21,7 @@ module.exports = {
'match': {
'phrase.default': {
'analyzer': 'peliasPhrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'test',
'type': 'phrase'

2
test/unit/fixture/autocomplete_linguistic_focus_null_island.js

@ -21,7 +21,7 @@ module.exports = {
'match': {
'phrase.default': {
'analyzer': 'peliasPhrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'test',
'type': 'phrase'

2
test/unit/fixture/autocomplete_linguistic_multiple_tokens.js

@ -45,7 +45,7 @@ module.exports = {
'phrase.default': {
'analyzer' : 'peliasPhrase',
'type' : 'phrase',
'boost' : 1,
'boost' : 0.5,
'slop' : 3,
'query' : 'one two three'
}

2
test/unit/fixture/autocomplete_linguistic_only.js

@ -22,7 +22,7 @@ module.exports = {
'phrase.default': {
'analyzer': 'peliasPhrase',
'type': 'phrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'test'
}

2
test/unit/fixture/autocomplete_with_layer_filtering.js

@ -21,7 +21,7 @@ module.exports = {
'match': {
'phrase.default': {
'analyzer': 'peliasPhrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'test',
'type': 'phrase'

2
test/unit/fixture/autocomplete_with_source_filtering.js

@ -21,7 +21,7 @@ module.exports = {
'match': {
'phrase.default': {
'analyzer': 'peliasPhrase',
'boost': 1,
'boost': 0.5,
'slop': 3,
'query': 'test',
'type': 'phrase'

Loading…
Cancel
Save