Full Text Search Conjunctive Query - .Boost Type Mismatch

There seems to be a typing mismatch issues in the .NET SDK 2.7.2 Search Query fluent interfaces.

The ConjunctiveQuery class takes an params array of FTSBaseQuery.
The .Boost() method for an individual query returns IFTSQuery

This results in a type mismatch when boosting a conjunctive query parameter.

E.g. This is an invalid statement

var myQuery = new ConjunctionQuery(new MatchQuery("term1").Field("field1").Boost(2.0), new MatchQuery("term2").Field("field2"));

I suppose I could cast the boosted fields to FTSBaseQuery, but this feels dirty and is not technically typesafe.

Hi @groogiam -

Thanks for posting this, it looks like a bug, I created a Jira to analyze/fix the issue and it should be in the next GA release this May.

-Jeff

Hi @groogiam

I’ve created a fix for the issue and it will hopefully be in the 2.7.7 release which is scheduled for 7th May 2019.

1 Like

@MikeGoldsmith Excellent! Thank you.

1 Like