Last active
December 26, 2015 23:19
-
-
Save brwe/7229896 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE testtags | |
POST testtags | |
{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
} | |
} | |
} | |
POST testtags/test/1 | |
{ | |
"location": "berlin" | |
} | |
POST testtags/test/2 | |
{ | |
"location": "berlin berlin" | |
} | |
#Should doc 2 not be ranked higher than doc 1? | |
POST testtags/test/_search | |
{ | |
"query": { | |
"match": { | |
"location": "berlin" | |
} | |
} | |
} | |
POST testtags/test/3 | |
{ | |
"location": "berlin hamburg" | |
} | |
POST testtags/test/4 | |
{ | |
"location": "hamburg" | |
} | |
POST testtags/test/_search | |
{ | |
"query": { | |
"match": { | |
"location": "berlin hamburg" | |
} | |
} | |
} | |
#Should doc 1 and 4 not get the same score? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE "http://localhost:9200/testtags/" | |
curl -XPOST "http://localhost:9200/testtags/" -d' | |
{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
} | |
} | |
}' | |
curl -XPOST "http://localhost:9200/testtags/test/1" -d' | |
{ | |
"location": "berlin" | |
}' | |
curl -XPOST "http://localhost:9200/testtags/test/2" -d' | |
{ | |
"location": "berlin berlin" | |
}' | |
#Should doc 2 not be ranked higher than doc 1? | |
curl -XPOST "http://localhost:9200/testtags/test/_search" -d' | |
{ | |
"query": { | |
"match": { | |
"location": "berlin" | |
} | |
} | |
}' | |
curl -XPOST "http://localhost:9200/testtags/test/3" -d' | |
{ | |
"location": "berlin hamburg" | |
}' | |
curl -XPOST "http://localhost:9200/testtags/test/4" -d' | |
{ | |
"location": "hamburg" | |
}' | |
curl -XPOST "http://localhost:9200/testtags/test/_search" -d' | |
{ | |
"query": { | |
"match": { | |
"location": "berlin hamburg" | |
} | |
} | |
}' | |
#Should doc 1 and 4 not get the same score? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE testtags | |
PUT testtags | |
{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1, | |
"number_of_replicas" : 0 | |
} | |
} | |
} | |
POST testtags/test/1 | |
{ | |
"location": "berlin" | |
} | |
POST testtags/test/2 | |
{ | |
"location": "berlin berlin" | |
} | |
#Should doc 2 not be ranked higher than doc 1? | |
POST testtags/test/_search | |
{ | |
"query": { | |
"match": { | |
"location": "berlin" | |
} | |
} | |
} | |
POST testtags/test/3 | |
{ | |
"location": "berlin hamburg" | |
} | |
POST testtags/test/4 | |
{ | |
"location": "hamburg" | |
} | |
POST testtags/test/_search | |
{ | |
"query": { | |
"match": { | |
"location": "berlin hamburg" | |
} | |
} | |
} | |
#Should doc 1 and 4 not get the same score? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment