Skip to content

Conversation

russcam
Copy link
Contributor

@russcam russcam commented Dec 18, 2017

Non binary breaking back port of 648c3cf

Similarity settings are nested under settings>index
Add ClassicSimilarity
Add DFISimilarity
Add similarity settings to create index integration tests
Add XML comments for each similarity
Refactor SimilarityJsonConverter to not look up the NEST ISimilarity type with Type.GetType() but to infer it from the type property value directly.
Add Similarity to the updatable index settings

Closes #2890

(cherry picked from commit bf78582)


public DefaultSimilarityDescriptor DiscountOverlaps(bool? discount = true) => Assign(a => a.DiscountOverlaps = discount);
/// <inheritdoc />
public DefaultSimilarityDescriptor DiscountOverlaps(bool discount = true) => Assign(a => a.DiscountOverlaps = discount);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs to be changed to bool? to maintain binary compatibility

/// BM25 Similarity. Introduced in Stephen E. Robertson, Steve Walker, Susan Jones, Micheline Hancock-Beaulieu,
/// and Mike Gatford. Okapi at TREC-3. In Proceedings of the Third Text REtrieval Conference (TREC 1994). Gaithersburg, USA, November 1994.
/// BM25 Similarity. Introduced in Stephen E. Robertson, Steve Walker, Susan Jones, Micheline Hancock-Beaulieu,
/// and Mike Gatford. Okapi at TREC-3. In Proceedings of the Third Text Retrieval Conference (TREC 1994). Gaithersburg, USA, November 1994.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@codebrain codebrain left a comment

Choose a reason for hiding this comment

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

LGTM


public DefaultSimilarityDescriptor DiscountOverlaps(bool? discount = true) => Assign(a => a.DiscountOverlaps = discount);
/// <inheritdoc />
public DefaultSimilarityDescriptor DiscountOverlaps(bool discount = true) => Assign(a => a.DiscountOverlaps = discount);
Copy link
Contributor

Choose a reason for hiding this comment

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

Binary breaking change.

var timeout = TimeSpan.FromSeconds(420);
var handle = new XplatManualResetEvent(false);
Task.Run(() =>
var task = Task.Run(() =>
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

{
discount_overlaps = true,
type = "default"
type = "classic"
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be default here in 2.x, not "classic"

Copy link
Member

Choose a reason for hiding this comment

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

{
discount_overlaps = true,
type = "default"
type = "classic"
Copy link
Member

Choose a reason for hiding this comment

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

russcam and others added 2 commits January 15, 2018 11:32
Non binary breaking back port of 648c3cf

Similarity settings are nested under settings>index
Add ClassicSimilarity
Add DFISimilarity
Add similarity settings to create index integration tests
Add XML comments for each similarity
Refactor SimilarityJsonConverter to not look up the NEST ISimilarity type with Type.GetType() but to infer it from the type property value directly.
Add Similarity to the updatable index settings

Closes #2890

(cherry picked from commit bf78582)
@russcam russcam force-pushed the fix/2.x-similarities branch from 753766d to 5d98435 Compare January 15, 2018 00:33
@russcam russcam merged commit 0ed05c3 into 2.x Jan 15, 2018
@russcam russcam deleted the fix/2.x-similarities branch January 15, 2018 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants