Match Exact Value of a Field and not be Included as a Subset in That Field, not more not less

(Maryam Abdullah) #1


please, I really need some help!

I want to be able to boost results if the query happens to match the exact value of a field and not be included as a subset in that field. This field has 2 analyzers, the custom one and the standard one which acts a tokenizer only.
I use the multi-match query and the querystring, however I need to use the term query, but with the following setting, it's not working.

.Text(s => s
  .Name(n => n.Title)
  .Fields(f => f.Text(t => t.Analyzer("ar_standard").Name("exact"))))

with the following setting:

.Settings(ss => ss
                    .Analysis(an => an
                        .TokenFilters(tf => tf
                            .Stop("arabic_stop", ts => ts
                            .KeywordMarker("ar_keywords", km => km.KeywordsPath(keywordsFile))
                            .Stemmer("arabic_stemmer", st => st
                        .Analyzers(ns => ns
                            .Custom("ar_analyzer", cm => cm
                                .Filters("arabic_stop", "ar_keywords", "arabic_normalization", "arabic_stemmer")
                            .Custom("ar_standard", cm => cm

Any thoughts on how it's possible to do this?

Thank you.

(system) closed #2

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