Skip to content

Commit 3ee3f5e

Browse files
committed
fixed a whole bunch of failing integration tests
1 parent 64cd634 commit 3ee3f5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+185
-872
lines changed

src/Nest/DSL/IQueryDescriptor.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ interface IQueryDescriptor<T>
4141
BaseQuery Terms(string field, params string[] terms);
4242
BaseQuery TermsDescriptor(Action<TermsQueryDescriptor<T, object>> selector);
4343
BaseQuery TermsDescriptor<K>(Action<TermsQueryDescriptor<T, K>> selector);
44-
BaseQuery Text(Action<TextQueryDescriptor<T>> selector);
45-
BaseQuery TextPhrase(Action<TextPhraseQueryDescriptor<T>> selector);
46-
BaseQuery TextPhrasePrefix(Action<TextPhrasePrefixQueryDescriptor<T>> selector);
4744
BaseQuery Match(Action<MatchQueryDescriptor<T>> selector);
4845
BaseQuery MatchPhrase(Action<MatchPhraseQueryDescriptor<T>> selector);
4946
BaseQuery MatchPhrasePrefix(Action<MatchPhrasePrefixQueryDescriptor<T>> selector);

src/Nest/DSL/Query/RawQuery.cs

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/Nest/DSL/Query/TextPhrasePrefixQueryDescriptor.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/Nest/DSL/Query/TextPhraseQueryDescriptor.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/Nest/DSL/Query/TextQueryDescriptor.cs

Lines changed: 0 additions & 104 deletions
This file was deleted.

src/Nest/DSL/QueryDescriptor.cs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -281,52 +281,6 @@ public BaseQuery FuzzyDate(Action<FuzzyDateQueryDescriptor<T>> selector)
281281
return this.New(query, q => q.FuzzyQueryDescriptor = fuzzy);
282282
}
283283

284-
/// <summary>
285-
/// The default text query is of type boolean. It means that the text provided is analyzed and the analysis
286-
/// process constructs a boolean query from the provided text.
287-
/// </summary>
288-
public BaseQuery Text(Action<TextQueryDescriptor<T>> selector)
289-
{
290-
var query = new TextQueryDescriptor<T>();
291-
selector(query);
292-
293-
var text = new Dictionary<PropertyPathMarker, object>()
294-
{
295-
{ query._Field, query}
296-
};
297-
return this.New(query, q => q.TextQueryDescriptor = text);
298-
}
299-
300-
/// <summary>
301-
/// The text_phrase query analyzes the text and creates a phrase query out of the analyzed text.
302-
/// </summary>
303-
public BaseQuery TextPhrase(Action<TextPhraseQueryDescriptor<T>> selector)
304-
{
305-
var query = new TextPhraseQueryDescriptor<T>();
306-
selector(query);
307-
308-
var text = new Dictionary<PropertyPathMarker, object>()
309-
{
310-
{ query._Field, query}
311-
};
312-
return this.New(query, q => q.TextQueryDescriptor = text);
313-
}
314-
315-
/// <summary>
316-
/// The text_phrase_prefix is the same as text_phrase, expect it allows for prefix matches on the last term
317-
/// in the text
318-
/// </summary>
319-
public BaseQuery TextPhrasePrefix(Action<TextPhrasePrefixQueryDescriptor<T>> selector)
320-
{
321-
var query = new TextPhrasePrefixQueryDescriptor<T>();
322-
selector(query);
323-
324-
var text = new Dictionary<PropertyPathMarker, object>()
325-
{
326-
{ query._Field, query}
327-
};
328-
return this.New(query, q => q.TextQueryDescriptor = text);
329-
}
330284

331285
/// <summary>
332286
/// The default text query is of type boolean. It means that the text provided is analyzed and the analysis

src/Nest/Domain/DSL/Query.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -201,20 +201,6 @@ public static BaseQuery TermsDescriptor<K>(Action<TermsQueryDescriptor<T, K>> se
201201
return new QueryDescriptor<T>().TermsDescriptor(selector);
202202
}
203203

204-
public static BaseQuery Text(Action<TextQueryDescriptor<T>> selector)
205-
{
206-
return new QueryDescriptor<T>().Text(selector);
207-
}
208-
209-
public static BaseQuery TextPhrase(Action<TextPhraseQueryDescriptor<T>> selector)
210-
{
211-
return new QueryDescriptor<T>().TextPhrase(selector);
212-
}
213-
214-
public static BaseQuery TextPhrasePrefix(Action<TextPhrasePrefixQueryDescriptor<T>> selector)
215-
{
216-
return new QueryDescriptor<T>().TextPhrasePrefix(selector);
217-
}
218204

219205
public static BaseQuery Match(Action<MatchQueryDescriptor<T>> selector)
220206
{

src/Nest/Domain/FieldSelection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ internal FieldSelection(ElasticInferrer inferrer, IDictionary<string, object> va
3434
[JsonConverter(typeof(DictionaryKeysAreNotPropertyNamesJsonConverter))]
3535
internal IDictionary<string, object> FieldValues { get; set; }
3636

37-
public K FieldValue<K>(Expression<Func<T, K>> objectPath)
37+
public K[] FieldValue<K>(Expression<Func<T, K>> objectPath)
3838
{
3939
var path = this.Infer.PropertyPath(objectPath);
40-
return this.FieldValue<K>(path);
40+
return this.FieldValue<K[]>(path);
4141
}
42-
public K FieldValue<K>(Expression<Func<T, object>> objectPath)
42+
public K[] FieldValue<K>(Expression<Func<T, object>> objectPath)
4343
{
4444
var path = this.Infer.PropertyPath(objectPath);
45-
return this.FieldValue<K>(path);
45+
return this.FieldValue<K[]>(path);
4646
}
4747

4848
public K FieldValue<K>(string path)

src/Nest/Domain/Hit/MultiGetHit.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public interface IMultiGetHit<out T> where T : class
1313

1414
string Index { get; }
1515

16-
bool Exists { get; }
16+
bool Found { get; }
1717

1818
string Type { get; }
1919

@@ -35,8 +35,8 @@ public class MultiGetHit<T> : IMultiGetHit<T>
3535
[JsonProperty(PropertyName = "_index")]
3636
public string Index { get; internal set; }
3737

38-
[JsonProperty(PropertyName = "exists")]
39-
public bool Exists { get; internal set; }
38+
[JsonProperty(PropertyName = "found")]
39+
public bool Found { get; internal set; }
4040

4141
[JsonProperty(PropertyName = "_type")]
4242
public string Type { get; internal set; }

src/Nest/Domain/Mapping/Descriptors/StringMappingDescriptor.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ public StringMappingDescriptor<T> OmitNorms(bool omitNorms = true)
5555
this._Mapping.OmitNorms = omitNorms;
5656
return this;
5757
}
58-
public StringMappingDescriptor<T> OmitTermFrequencyAndPositions(bool omitTermFrequencyAndPositions = true)
59-
{
60-
this._Mapping.OmitTermFrequencyAndPositions = omitTermFrequencyAndPositions;
61-
return this;
62-
}
58+
6359
public StringMappingDescriptor<T> IndexOptions(IndexOptions indexOptions)
6460
{
6561
this._Mapping.IndexOptions = indexOptions;

0 commit comments

Comments
 (0)