-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
The current ADS API allows for additional option related to the highlighting of search terms, but these options are not passable through SearchQuery. I've added the API parameters "hl.snippets" and "hl.maxAnalyzedChars" to my own version of search.py. Would it be possible to include that in this distribution?
The things I changed in the definition of SearchQuery were
def __init__(self, query_dict=None, q=None, fq=None, fl=DEFAULT_FIELDS,
sort=None, cursorMark=None, start=None, rows=50, max_pages=1,
token=None, hl=None, hl_snippets=2, hl_maxAnalyzedChars=51200, **kwargs):
and
_ = {
"q": q or '',
"fq": fq,
"fl": fl,
"hl": hl,
"hl.fl": hl_fl,
"hl.snippets": hl_snippets,
"hl.maxAnalyzedChars": hl_maxAnalyzedChars,
"sort": sort,
"start": start,
"cursorMark": cursorMark,
"rows": int(rows),
}
It should be just as easy to add the option of "hl.fragsize". I didn't do that because I had no need for it for my work.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels