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
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<Compile Include="Domain\ApiUrlPart.cs" />
<Compile Include="Domain\CsharpMethod.cs" />
<Compile Include="Extensions.cs" />
<Compile Include="Overrides\Descriptors\DeleteWarmerDescriptorOverrides.cs" />
<Compile Include="Overrides\Descriptors\PutTemplateDescriptorOverrides.cs" />
<Compile Include="Overrides\Descriptors\SearchDescriptorOverrides.cs" />
<Compile Include="Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeGeneration.LowLevelClient.Overrides.Descriptors
{
public class DeleteWarmerDescriptorOverrides : IDescriptorOverrides
{
public IEnumerable<string> SkipQueryStringParams
{
get
{
return new string[]
{
"name"
};
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public IEnumerable<string> SkipQueryStringParams
"version",
"q", //we dont support GET searches
"fields",
"sort"
"sort",
"_source",
"_source_include",
"_source_exclude"
};
}
}
Expand Down
13 changes: 3 additions & 10 deletions src/Nest/DSL/CountDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
namespace Nest
{
[DescriptorFor("Count")]
[JsonConverter(typeof(CustomJsonConverter))]
public partial class CountDescriptor<T>
: QueryPathDescriptorBase<CountDescriptor<T>, T, CountQueryString>
, IActAsQuery
, IPathInfo<CountQueryString>
, ICustomJson
where T : class
{
BaseQuery IActAsQuery._Query { get; set; }
[JsonProperty("query")]
internal BaseQuery _Query { get; set; }

public CountDescriptor<T> Query(Func<QueryDescriptor<T>, BaseQuery> querySelector)
{
((IActAsQuery)this)._Query = querySelector(new QueryDescriptor<T>());
this._Query = querySelector(new QueryDescriptor<T>());
return this;
}

Expand All @@ -31,10 +29,5 @@ ElasticsearchPathInfo<CountQueryString> IPathInfo<CountQueryString>.ToPathInfo(I

return pathInfo;
}

object ICustomJson.GetCustomJson()
{
return ((IActAsQuery) this)._Query;
}
}
}
18 changes: 17 additions & 1 deletion src/Nest/DSL/FluentDictionary.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Nest.Resolvers;

namespace Nest
{
public class FluentFieldList<T> : List<PropertyPathMarker> where T : class
{
public new FluentFieldList<T> Add(Expression<Func<T, object>> k)
{
base.Add(k);
return this;
}
public new FluentFieldList<T> Add(string k)
{
base.Add(k);
return this;
}
}
public class FluentDictionary<K, V> : Dictionary<K, V>
{
public FluentDictionary()
Expand Down
3 changes: 0 additions & 3 deletions src/Nest/DSL/IQueryDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ interface IQueryDescriptor<T>
BaseQuery Terms(string field, params string[] terms);
BaseQuery TermsDescriptor(Action<TermsQueryDescriptor<T, object>> selector);
BaseQuery TermsDescriptor<K>(Action<TermsQueryDescriptor<T, K>> selector);
BaseQuery Text(Action<TextQueryDescriptor<T>> selector);
BaseQuery TextPhrase(Action<TextPhraseQueryDescriptor<T>> selector);
BaseQuery TextPhrasePrefix(Action<TextPhrasePrefixQueryDescriptor<T>> selector);
BaseQuery Match(Action<MatchQueryDescriptor<T>> selector);
BaseQuery MatchPhrase(Action<MatchPhraseQueryDescriptor<T>> selector);
BaseQuery MatchPhrasePrefix(Action<MatchPhrasePrefixQueryDescriptor<T>> selector);
Expand Down
49 changes: 0 additions & 49 deletions src/Nest/DSL/PartialFieldDescriptor.cs

This file was deleted.

25 changes: 0 additions & 25 deletions src/Nest/DSL/Query/RawQuery.cs

This file was deleted.

21 changes: 0 additions & 21 deletions src/Nest/DSL/Query/TextPhrasePrefixQueryDescriptor.cs

This file was deleted.

20 changes: 0 additions & 20 deletions src/Nest/DSL/Query/TextPhraseQueryDescriptor.cs

This file was deleted.

104 changes: 0 additions & 104 deletions src/Nest/DSL/Query/TextQueryDescriptor.cs

This file was deleted.

46 changes: 0 additions & 46 deletions src/Nest/DSL/QueryDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,52 +281,6 @@ public BaseQuery FuzzyDate(Action<FuzzyDateQueryDescriptor<T>> selector)
return this.New(query, q => q.FuzzyQueryDescriptor = fuzzy);
}

/// <summary>
/// The default text query is of type boolean. It means that the text provided is analyzed and the analysis
/// process constructs a boolean query from the provided text.
/// </summary>
public BaseQuery Text(Action<TextQueryDescriptor<T>> selector)
{
var query = new TextQueryDescriptor<T>();
selector(query);

var text = new Dictionary<PropertyPathMarker, object>()
{
{ query._Field, query}
};
return this.New(query, q => q.TextQueryDescriptor = text);
}

/// <summary>
/// The text_phrase query analyzes the text and creates a phrase query out of the analyzed text.
/// </summary>
public BaseQuery TextPhrase(Action<TextPhraseQueryDescriptor<T>> selector)
{
var query = new TextPhraseQueryDescriptor<T>();
selector(query);

var text = new Dictionary<PropertyPathMarker, object>()
{
{ query._Field, query}
};
return this.New(query, q => q.TextQueryDescriptor = text);
}

/// <summary>
/// The text_phrase_prefix is the same as text_phrase, expect it allows for prefix matches on the last term
/// in the text
/// </summary>
public BaseQuery TextPhrasePrefix(Action<TextPhrasePrefixQueryDescriptor<T>> selector)
{
var query = new TextPhrasePrefixQueryDescriptor<T>();
selector(query);

var text = new Dictionary<PropertyPathMarker, object>()
{
{ query._Field, query}
};
return this.New(query, q => q.TextQueryDescriptor = text);
}

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