Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Nest/Mapping/Types/Core/Text/TextAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class TextAttribute : ElasticsearchCorePropertyAttributeBase, ITextProper
public string SearchAnalyzer { get { return Self.SearchAnalyzer; } set { Self.SearchAnalyzer = value; } }
public string SearchQuoteAnalyzer { get { return Self.SearchQuoteAnalyzer; } set { Self.SearchQuoteAnalyzer = value; } }
public bool Norms { get { return Self.Norms.GetValueOrDefault(true); } set { Self.Norms = value; } }
public TermVectorOption TermVector { get { return Self.TermVector.GetValueOrDefault(); } set { Self.TermVector = value; } }

public TextAttribute() : base("text") { }
}
Expand Down
6 changes: 4 additions & 2 deletions src/Tests/Mapping/Types/Core/Text/TextAttributeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public class TextTest
SearchQuoteAnalyzer = "mysearchquoteanalyzer",
Similarity = "classic",
Store = true,
Norms = false)]
Norms = false,
TermVector = TermVectorOption.WithPositionsOffsets)]
public string Full { get; set; }

[Text]
Expand Down Expand Up @@ -48,7 +49,8 @@ public class TextAttributeTests : AttributeTestsBase<TextTest>
search_quote_analyzer = "mysearchquoteanalyzer",
similarity = "classic",
store = true,
norms = false
norms = false,
term_vector = "with_positions_offsets"
},
minimal = new
{
Expand Down
7 changes: 5 additions & 2 deletions src/Tests/Mapping/Types/Core/Text/TextPropertyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public TextPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(cl
search_quote_analyzer = "standard",
similarity = "classic",
store = true,
norms = false
norms = false,
term_vector = "with_positions_offsets"
}
}
};
Expand Down Expand Up @@ -81,6 +82,7 @@ public TextPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(cl
.Similarity(SimilarityOption.Classic)
.Store()
.Norms(false)
.TermVector(TermVectorOption.WithPositionsOffsets)
);


Expand Down Expand Up @@ -115,7 +117,8 @@ public TextPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(cl
SearchQuoteAnalyzer = "standard",
Similarity = SimilarityOption.Classic,
Store = true,
Norms = false
Norms = false,
TermVector = TermVectorOption.WithPositionsOffsets
}
}
};
Expand Down