Docs: Clarify constraints on scripted similarities.#31076
Docs: Clarify constraints on scripted similarities.#31076jpountz merged 2 commits intoelastic:masterfrom
Conversation
Scripted similarities provide a lot of flexibility but they still need to obey some rules to not confuse Lucene.
|
Pinging @elastic/es-search-aggs |
nik9000
left a comment
There was a problem hiding this comment.
I'd be nice if we could enforce this kind of thing. This seems like a good way to really confuse folks. Reminds me of transform a little.
jimczi
left a comment
There was a problem hiding this comment.
LGTM
Can we at least ensure that scores are positive in a follow up ?
Yeah, do you have ideas how to do it?
Do you mean something like adding assertions to ScriptedSimilarity that scores are positive? |
Not really.... Sorry! It'd be nice but I don't really know. |
* es/master: Take into account the return value of TcpTransport.readMessageLength(...) in Netty4SizeHeaderFrameDecoder Move caching of the size of a directory to `StoreDirectory`. (#30581) Clarify docs about boolean operator precedence. (#30808) Docs: remove notes on sparsity. (#30905) Fix MatchPhrasePrefixQueryBuilderTests#testPhraseOnFieldWithNoTerms run overflow forecast a 2nd time as regression test for elastic/ml-cpp#110 (#30969) Improve documentation of dynamic mappings. (#30952) Decouple MultiValueMode. (#31075) Docs: Clarify constraints on scripted similarities. (#31076) Update get.asciidoc (#31084)
Scripted similarities provide a lot of flexibility but they still need to obey some rules to not confuse Lucene.
* elastic/master: [Tests] Muting RatedRequestsTests#testXContentParsingIsNotLenient TEST: Retry synced-flush if ongoing ops on primary (elastic#30978) Fix docs build. Only auto-update license signature if all nodes ready (elastic#30859) Add BlobContainer.writeBlobAtomic() (elastic#30902) Add a doc value format to binary fields. (elastic#30860) Take into account the return value of TcpTransport.readMessageLength(...) in Netty4SizeHeaderFrameDecoder Move caching of the size of a directory to `StoreDirectory`. (elastic#30581) Clarify docs about boolean operator precedence. (elastic#30808) Docs: remove notes on sparsity. (elastic#30905) Fix MatchPhrasePrefixQueryBuilderTests#testPhraseOnFieldWithNoTerms run overflow forecast a 2nd time as regression test for elastic/ml-cpp#110 (elastic#30969) Improve documentation of dynamic mappings. (elastic#30952) Decouple MultiValueMode. (elastic#31075) Docs: Clarify constraints on scripted similarities. (elastic#31076)
* 6.x: Share common readFrom/writeTo code in AcknowledgeResponse (#30983) [Tests] Muting RatedRequestsTests#testXContentParsingIsNotLenient Fix rest test skip version Fix docs build. Add a doc value format to binary fields. (#30860) Only auto-update license signature if all nodes ready (#30859) Add BlobContainer.writeBlobAtomic() (#30902) Move caching of the size of a directory to `StoreDirectory`. (#30581) Clarify docs about boolean operator precedence. (#30808) Docs: remove notes on sparsity. (#30905) Improve documentation of dynamic mappings. (#30952) Decouple MultiValueMode. (#31075) Docs: Clarify constraints on scripted similarities. (#31076)
Yes or even an hard exception to ensure that we don't miss documents if |
|
Unfortunately, we'd also miss documents if the function does not honor the constraints on freq and norm. Which is much harder to check. |
Scripted similarities provide a lot of flexibility but they still need to obey
some rules to not confuse Lucene.