Skip to content

Commit

Permalink
Fix parser sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Nov 24, 2023
1 parent 318b692 commit 219684b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion archive_query_log/parsers/url_offset.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _url_offset_parsers(
parsers: Iterable[UrlOffsetParser] = (
UrlOffsetParser.search(using=config.es.client)
.filter(Term(provider__id=provider_id))
.sort("-priority")
.query(RankFeature(field="priority", saturation={}))
.scan()
)
parsers = safe_iter_scan(parsers)
Expand Down
2 changes: 1 addition & 1 deletion archive_query_log/parsers/url_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _url_page_parsers(
parsers: Iterable[UrlPageParser] = (
UrlPageParser.search(using=config.es.client)
.filter(Term(provider__id=provider_id))
.sort("-priority")
.query(RankFeature(field="priority", saturation={}))
.scan()
)
parsers = safe_iter_scan(parsers)
Expand Down
2 changes: 1 addition & 1 deletion archive_query_log/parsers/url_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _url_query_parsers(
parsers: Iterable[UrlQueryParser] = (
UrlQueryParser.search(using=config.es.client)
.filter(Term(provider__id=provider_id))
.sort("-priority")
.query(RankFeature(field="priority", saturation={}))
.scan()
)
parsers = safe_iter_scan(parsers)
Expand Down
2 changes: 1 addition & 1 deletion archive_query_log/parsers/warc_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _warc_query_parsers(
parsers: Iterable[WarcQueryParser] = (
WarcQueryParser.search(using=config.es.client)
.filter(Term(provider__id=provider_id))
.sort("-priority")
.query(RankFeature(field="priority", saturation={}))
.scan()
)
parsers = safe_iter_scan(parsers)
Expand Down
2 changes: 1 addition & 1 deletion archive_query_log/parsers/warc_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _warc_snippets_parsers(
parsers: Iterable[WarcSnippetsParser] = (
WarcSnippetsParser.search(using=config.es.client)
.filter(Term(provider__id=provider_id))
.sort("-priority")
.query(RankFeature(field="priority", saturation={}))
.scan()
)
parsers = safe_iter_scan(parsers)
Expand Down

0 comments on commit 219684b

Please sign in to comment.