Closed
Description
I tried executing a CommonTermsQuery
using the following code:
[Fact]
public void TestQuery()
{
// method to get a client with correct connection settings
var client = GetElasticClient();
var result = client.Search<IndexedTeam>(s => s
.Query(q => q
.CommonTerms(t => t
.OnField("name")
.Query("Huskers"))));
Assert.True(result.Hits.Any());
}
and the query returned no results. Using a REST client, I manually sent a post query with the following body to the same instance of Elasticsearch and received several results:
{
"query" : {
"common" : {
"name" : {
"query" : "Huskers"
}
}
}
}
and I received many results. I believe the issue is in this line. The PropertyName
should be "common"
so that it matches the Elasticsearch specs. I've cloned the repo locally and tried making this change on my side and it seems to fix the issue, but I wanted to see if anyone else had reported this or noticed it before submitting a pull request. Thanks in advance for you response!
Metadata
Metadata
Assignees
Labels
No labels