Second index on elastic search

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)

                                            )
                                        )

is it possible that the mapping of those two indices differs for the fields you are using in your function score query?

You can retrieve the mappings via the Get Mapping API

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.