Compare commits
No commits in common. "27b0928e73d0aac061265b9e86e992236f0c7dce" and "e382cc1ea55b87d51470e955532543ffb3118383" have entirely different histories.
27b0928e73
...
e382cc1ea5
|
@ -254,18 +254,14 @@ class SearchService:
|
|||
return
|
||||
|
||||
try:
|
||||
# Repeat title 3 times for higher keyword relevance
|
||||
title_repeat = ". ".join(filter(None, [shout.title] * 3))
|
||||
|
||||
# Combine all text fields
|
||||
text_parts = [
|
||||
title_repeat,
|
||||
text = " ".join(filter(None, [
|
||||
shout.title or "",
|
||||
shout.subtitle or "",
|
||||
shout.lead or "",
|
||||
shout.body or "",
|
||||
shout.media or ""
|
||||
]
|
||||
text = " ".join(filter(None, text_parts))
|
||||
]))
|
||||
|
||||
if not text.strip():
|
||||
logger.warning(f"No text content to index for shout {shout.id}")
|
||||
|
@ -309,12 +305,7 @@ class SearchService:
|
|||
for shout in shouts:
|
||||
try:
|
||||
text_fields = []
|
||||
|
||||
# Repeat title 3 times
|
||||
title_repeat = ". ".join(filter(None, [getattr(shout, "title", None)] * 3))
|
||||
|
||||
text_fields = [title_repeat]
|
||||
for field_name in ['subtitle', 'lead', 'body']:
|
||||
for field_name in ['title', 'subtitle', 'lead', 'body']:
|
||||
field_value = getattr(shout, field_name, None)
|
||||
if field_value and isinstance(field_value, str) and field_value.strip():
|
||||
text_fields.append(field_value.strip())
|
||||
|
|
Loading…
Reference in New Issue
Block a user