Open hainingren opened 7 years ago
Hi,
Unfortunately my work has been lost, so I'll try my best. Lets say you have a field in your document, where you put some (calculated) phash value - lets call it 'phash'
Then the idea was to be able to score depending on distance to any given input_phash, something like:
{
"query": {
"function_score": {
"boost_mode": "replace",
"functions": [
{
"script_score": {
"script": "hamming",
"lang": "native",
"params": {
"hash": PHASH_TO_CHECK,
"field": "phash"
}
}
}
]
}
}
}
IN this case scoring is distance between PHASH_TO_CHECK and actual phash on documents.
Hi! I've successfully compiled and installed this on my elasticsearch. Then I realized I couldn't find an example usage. Would you advise?