-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
NEST/Elasticsearch.Net version: 5.0.0
Elasticsearch version: 5.0.0
Description of the problem including expected versus actual behavior: I am trying to highlight some match_phrase queries with slop. With the plain highlight is working fine, but with fvh does not and I don't know why.
Steps to reproduce:
- Index some documents.
- Do a match_phrase query with slop and using fvh, like this:
var resultado2 = client.Search<dynamic>(s => s
.Size(100)
.Type(Types.Type("text"))
.Query(q => q.MatchPhrase( mf => mf.Field("textContent").Query(TextToSearch).Slop(8))
)
.Highlight(h => h
.PreTags("<strong style=\"color:#FF4000;\">")
.PostTags("</strong>")
.Fields(fs => fs
.Field("textContent")
.Order("score")
.Type(HighlighterType.Fvh)
.FragmentSize(150)
.NumberOfFragments(3)
.NoMatchSize(150)
.ForceSource()
))
)
;
- When I see the results, the words are not highlighted.
Provide ConnectionSettings
(if relevant):
client.CreateIndex("documents", c => c
.Settings(s => s
.NumberOfShards(1)
.NumberOfReplicas(1)
.Analysis(analysis => analysis
.TokenFilters(tf => tf.Stop("stop_es",st => st.StopWords("_spanish_")))
.Analyzers(bases => bases
//.Snowball("es_std", es => es.Language(SnowballLanguage.Spanish))
.Custom("analizador_prueba", ca => ca
.Tokenizer("standard")
.Filters("lowercase","stop_es","asciifolding")
)
)
)
)
.Map<texto>(d => d
.Properties(p => p
.Text(st => st
.Name(na => na.textContent)
.TermVector(TermVectorOption.WithPositionsOffsets)
.Analyzer("analizador_prueba")
)
)
)
Provide DebugInformation
(if relevant):
Describe the feature:
Is there any problems with the fvh with match_phrase queries with slop?
Metadata
Metadata
Assignees
Labels
No labels