I am seeing the same exact index and the same exact query return different
results, could someone please help me understand?
curl -X DELETE http://localhost:9200/search
curl -X POST http://localhost:9200/search -d '{
"mappings": {
"document": {
"properties": {
"first": {
"type": "string"
},
"last": {
"type": "string",
"boost": 2.0
}
}
}
}
}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Kimberly","last":"Leighton"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"Barbara"
,"last":"Leighton"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"John",
"last":"Leighton"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"Nancy",
"last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Lawrence","last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"Louis",
"last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Leighton","last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Leighton","last":"Sweet"}'
curl -X POST "http://localhost:9200/search/_refresh"
curl -X GET 'http://localhost:9200/search/_search?pretty' -d '{
"query": {
"query_string": {
"query": "Mark Leighton"
}
}
}'
RESULTS: ["Leighton Mark", "Louis Mark", "Kimberly Leighton", "Barbara
Leighton", "John Leighton", "Nancy Mark", "Lawrence Mark", "Leighton Sweet"]
I run the same excact code again and the results are different
*
*
*
*
curl -X DELETE http://localhost:9200/search
curl -X POST http://localhost:9200/search -d '{
"mappings": {
"document": {
"properties": {
"first": {
"type": "string"
},
"last": {
"type": "string",
"boost": 2.0
}
}
}
}
}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Kimberly","last":"Leighton"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"Barbara"
,"last":"Leighton"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"John",
"last":"Leighton"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"Nancy",
"last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Lawrence","last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":"Louis",
"last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Leighton","last":"Mark"}'
curl -X POST "http://localhost:9200/search/document/" -d '{"first":
"Leighton","last":"Sweet"}'
curl -X POST "http://localhost:9200/search/_refresh"
curl -X GET 'http://localhost:9200/search/_search?pretty' -d '{
"query": {
"query_string": {
"query": "Mark Leighton"
}
}
}'
RESULTS: ["Nancy Mark", "Leighton Mark", "Lawrence Mark", "Louis Mark",
"Leighton Sweet", "Kimberly Leighton", "Barbara Leighton", "John Leighton"]
The first time the top results was "Leighton Mark" as it should be because
it matches both terms. The same query seconds later returns a different
search result.
Is scoring broken in Elasticsearch/Lucene?
Thank you.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.