Skip to content

Commit

Permalink
enhancement/extra-hl-fields (#92)
Browse files Browse the repository at this point in the history
As noted in issue#65 by @aaccomazzi, there are 3 more fields available
when using highlights:
 * ack
 * aff
 * author

Updated keyword and README
  • Loading branch information
jonnybazookatone authored and Vladimir Sudilovsky committed Jan 11, 2017
1 parent 9bd1ba3 commit 914d57c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ The ADS allows you to search content that was extracted from the abstract, body,
{'abstract': [' in the early universe or in the ultra-dense core of neutron <em>stars.</em> The thermal radiation from the quarks']}
```

The tags **<em></em>** *highlight* the relevant text. This feature is only available when searching the fields `title, abstract, body`.
The tags **<em></em>** *highlight* the relevant text. This feature is only available when searching the fields `title`, `abstract`, `body`, `ack`, `aff`, `author`.


**Rate limits and optimisations**
Expand Down
2 changes: 1 addition & 1 deletion ads/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class SearchQuery(BaseQuery):
HTTP_ENDPOINT = SEARCH_URL
DEFAULT_FIELDS = ["author", "first_author", "bibcode", "id", "year",
"title"]
HIGHLIGHT_FIELDS = ["abstract", "title", "body"]
HIGHLIGHT_FIELDS = ["abstract", "title", "body", "ack", "aff", "author"]

def __init__(self, query_dict=None, q=None, fq=None, fl=DEFAULT_FIELDS,
sort=None, cursorMark=None, start=None, rows=50, max_pages=1,
Expand Down

0 comments on commit 914d57c

Please sign in to comment.