6-9. Favorite Places: Make a dictionary called favorite_places. Think of three
names to use as keys in the dictionary, and store one to three favorite places
for each person. To make this exercise a bit more interesting, ask some friends
to name a few of their favorite places. Loop through the dictionary, and print
each person’s name and their favorite places
queryset.annotate(
last_job_status=Window(
expression=LastValue("workitem__job__status"),
partition_by=F('workitem__id'),
order_by=F('workitem__job__id')
)
).filter(last_job_status=Job.STATE_COMPLETED)
Proximity distance is specified in words, adjusted for word count, and applies to all words within quotes. For instance, "cat dog mouse"~5 query means that there must be less than 8-word span which contains all 3 words, ie. "CAT aaa bbb ccc DOG eee fff MOUSE" document will not match this query, because this span is exactly 8 words long.
OPTION ranker=expr('sum(wlccs*user_weight) * 100500 - doc_word_count * 42')