Skip to content

Commit

Permalink
Explicitly set hl.method to original and hl.fragsize to 100 so there …
Browse files Browse the repository at this point in the history
…is no change to highlighting behaviour after #85 Upgrade from Solr 8.11.1 to 9.1.0
  • Loading branch information
m-i-l committed Jan 21, 2023
1 parent eb5ae8c commit dd45e0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/web/content/dynamic/searchmysite/solr.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,18 @@
"fl": ["id", "url", "title", "description", "contains_adverts", "published_date"],
"q.op": "AND",
"fq": mandatory_filter_queries_search,
"hl": "on",
"hl": True,
"hl.fl": ["content", "description"],
"hl.method": "original", # default is "original" in Sol 8 but "unified" in Solr 9. Unfortunately "unified" in Solr 9.0 seems to ignore hl.fragsize
"hl.fragsize": 100,
"hl.simple.pre": split_text,
"hl.simple.post": split_text,
"group": True,
"group.field": "domain",
"group.limit": 3,
"group.ngroups": True
}

query_facets_search = {
"site_category": { "field": "site_category", "type": "terms", "limit": 2, "sort": "count" },
"in_web_feed": { "field": "in_web_feed", "type": "terms", "limit": 2, "sort": "count" },
Expand Down

0 comments on commit dd45e0f

Please sign in to comment.