How to use C# Optional Parameters In Search Query?
public virtual List<Product> SearchProducts(
bool? isFeatured = null,
bool? sameDayShipping = null,
bool? isMostAdvantage = null,
bool? overridePublished = null)
{
var searchResponse = client.Search<Product>(s => s
.Index("product")
// How can I add non-null optional parameters?
);
}
forloop
(Russ Cam)
March 1, 2018, 6:52am
2
What version of NEST are you using?
Hi,
Elastic version information is detailed below.
{
"name": "LocalNode",
"cluster_name": "elasticsearch",
"cluster_uuid": "UmPUC8uoS8yl1CttzX2zaA",
"version": {
"number": "6.2.2",
"build_hash": "10b1edd",
"build_date": "2018-02-16T19:01:30.685723Z",
"build_snapshot": false,
"lucene_version": "7.2.1",
"minimum_wire_compatibility_version": "5.6.0",
"minimum_index_compatibility_version": "5.0.0"
},
"tagline": "You Know, for Search"
}
forloop
(Russ Cam)
March 17, 2018, 12:12am
4
That's the version of Elasticsearch you're running against. What version of the NEST .NET client are you using to communicate with Elasticsearch?
system
(system)
Closed
April 14, 2018, 12:12am
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.