Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

returned proper types from query building fluent interface in order t…

…o avoid an ambiguity

git-svn-id: http://solrnet.googlecode.com/svn/trunk@309 66c3f25c-543c-0410-ae2e-6f2ca0bd8c61
  • Loading branch information...
commit cfbb8403511be639b30394d2c1958cfe218337d0 1 parent 3287f38
@mausch mausch authored
View
2  SampleSolrApp/Controllers/HomeController.cs
@@ -39,7 +39,7 @@ public class HomeController : Controller {
/// <returns></returns>
public ISolrQuery BuildQuery(SearchParameters parameters) {
var queriesFromFacets = from p in parameters.Facets
- select Query.Field(p.Key).Is(p.Value);
+ select (ISolrQuery) Query.Field(p.Key).Is(p.Value);
var queries = queriesFromFacets.ToList();
if (!string.IsNullOrEmpty(parameters.FreeSearch))
queries.Add(new SolrQuery(parameters.FreeSearch));
View
6 SolrNet.DSL/Impl/FieldDefinition.cs
@@ -29,15 +29,15 @@ public class FieldDefinition {
return new RangeDefinition<T>(fieldName, from);
}
- public ISolrQuery In<T>(params T[] values) {
+ public SolrQueryInList In<T>(params T[] values) {
return new SolrQueryInList(fieldName, Func.Select(values, v => Convert.ToString(v)));
}
- public ISolrQuery Is<T>(T value) {
+ public SolrQueryByField Is<T>(T value) {
return new SolrQueryByField(fieldName, Convert.ToString(value));
}
- public ISolrQuery HasAnyValue() {
+ public SolrQueryByRange<string> HasAnyValue() {
return From("*").To("*");
}
}
View
2  SolrNet.DSL/Impl/RangeDefinition.cs
@@ -24,7 +24,7 @@ public class RangeDefinition<T> {
this.from = from;
}
- public ISolrQuery To(T to) {
+ public SolrQueryByRange<T> To(T to) {
return new SolrQueryByRange<T>(fieldName, from, to);
}
}
View
2  SolrNet.DSL/Query.cs
@@ -18,7 +18,7 @@
namespace SolrNet.DSL {
public static class Query {
- public static ISolrQuery Simple(string s) {
+ public static SolrQuery Simple(string s) {
return new SolrQuery(s);
}
Please sign in to comment.
Something went wrong with that request. Please try again.