Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Clarify constraints on scripted similarities. #31076

Merged
merged 2 commits into from
Jun 5, 2018

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Jun 4, 2018

Scripted similarities provide a lot of flexibility but they still need to obey
some rules to not confuse Lucene.

Scripted similarities provide a lot of flexibility but they still need to obey
some rules to not confuse Lucene.
@jpountz jpountz added >docs General docs changes :Search Relevance/Ranking Scoring, rescoring, rank evaluation. v7.0.0 v6.4.0 labels Jun 4, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@jpountz jpountz changed the title Docs/similarity scores Docs: Clarify constraints on scripted similarities. Jun 4, 2018
Copy link
Member

@nik9000 nik9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Can we at least ensure that scores are positive in a follow up ?

@jpountz
Copy link
Contributor Author

jpountz commented Jun 4, 2018

I'd be nice if we could enforce this kind of thing.

Yeah, do you have ideas how to do it?

Can we at least ensure that scores are positive in a follow up ?

Do you mean something like adding assertions to ScriptedSimilarity that scores are positive?

@nik9000
Copy link
Member

nik9000 commented Jun 4, 2018

Yeah, do you have ideas how to do it?

Not really.... Sorry! It'd be nice but I don't really know.

@jpountz jpountz merged commit f507381 into elastic:master Jun 5, 2018
@jpountz jpountz deleted the docs/similarity_scores branch June 5, 2018 06:51
martijnvg added a commit that referenced this pull request Jun 5, 2018
* 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)
jpountz added a commit that referenced this pull request Jun 5, 2018
Scripted similarities provide a lot of flexibility but they still need to obey
some rules to not confuse Lucene.
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Jun 5, 2018
* 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)
dnhatn added a commit that referenced this pull request Jun 5, 2018
* 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)
@jimczi
Copy link
Contributor

jimczi commented Jun 6, 2018

Do you mean something like adding assertions to ScriptedSimilarity that scores are positive?

Yes or even an hard exception to ensure that we don't miss documents if track_total_hits is false ?

@jpountz
Copy link
Contributor Author

jpountz commented Jun 6, 2018

Unfortunately, we'd also miss documents if the function does not honor the constraints on freq and norm. Which is much harder to check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Search Relevance/Ranking Scoring, rescoring, rank evaluation. v6.4.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants