Hy i have two index on elastic the first catalogo_prodotti and the second catalogo_esercenti.
In the second i use the functionscore in this way, but when i try to get the list, i have the error
Fielddata is disabled on text fields by default, please help me thankyou
client.Search(s => s
.From(0)
.Size(numerorisultati)
.Query(q => q
.FunctionScore(fsc => fsc
.BoostMode(FunctionBoostMode.Multiply)
.ScoreMode(FunctionScoreMode.Sum)
.Functions(f => f
.FieldValueFactor(b => b
.Field("id").Factor(fattID)
.Missing(0.7)
.Modifier(FieldValueFactorModifier.None)
)
.FieldValueFactor(b => b
.Field("vendor").Factor(fattVE)
.Missing(0.7)
.Modifier(FieldValueFactorModifier.None)
)
.FieldValueFactor(b => b
.Field("descrizione").Factor(fattDE)
.Missing(0.7)
.Modifier(FieldValueFactorModifier.None)
)
.FieldValueFactor(b => b
.Field("testoricerca").Factor(fattTE)
.Missing(0.7)
.Modifier(FieldValueFactorModifier.None)
)
)
.Query(qx =>
qx.MultiMatch(m => m
.Query(searchstr)
.Analyzer("standard")
.Fields(ff => ff
.Field(f => f.Id, fattID)
.Field(f => f.vendor, fattVE)
.Field(f => f.descrizione, fattDE)
.Field(f => f.testoricerca, fattTE)
)
.Type(TextQueryType.MostFields)
)
)