0001-misc-remove-external-links-from-search-index-when-re.patch
combo/apps/search/management/commands/update_index.py | ||
---|---|---|
35 | 35 |
# do not index site if there's no matching search cell |
36 | 36 |
return |
37 | 37 |
if not options.get('skip_external_links_collection', False): |
38 |
self.collect_external_links() |
|
38 |
self.collect_external_links(options)
|
|
39 | 39 |
return super(Command, self).handle(**options) |
40 | 40 | |
41 |
def collect_external_links(self): |
|
41 |
def collect_external_links(self, options):
|
|
42 | 42 |
start_time = now() |
43 | 43 | |
44 |
if options.get('remove'): |
|
45 |
ExternalLinkSearchItem.objects.all().delete() |
|
46 | ||
44 | 47 |
# assemble external links data |
45 | 48 |
links = {} |
46 | 49 |
for page in Page.objects.all(): |
47 |
- |