adsabs / adsabs-dev-api

Developer API service description and example client code
165 stars 58 forks source link

rule about link_type of full text sources #31

Closed dev-jonghoonpark closed 7 years ago

dev-jonghoonpark commented 7 years ago

I want to make service like https://ui.adsabs.harvard.edu/#

how can i know what kind of full text source is available? i can't find specific rule about link_type.

http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode={doc.bibcode}&link_type={link_type}

Is there any relationship between link type and property field? or should I find other field?

Currently, I'm working on my project using property field but something goes wrong

for example

in https://ui.adsabs.harvard.edu/#abs/2017NewA...55...32F/abstract doen't show Publisher Article source but i can access to http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2017NewA...55...32F&link_type=EJOURNAL and it have 'ARTICLE' value in property field

in https://ui.adsabs.harvard.edu/#abs/1536zvwv.book.....E/abstract it have 'NONARTICLE' value in property field but it show Publisher Article.

aaccomazzi commented 7 years ago

The information about the kinds of links available for an article is found in the "link_data" field of the document returned by a query. For the document in question, you can obtain this by querying the API with something such as this:

curl -H "Authorization: Bearer $ADS_DEV_KEY" 'https://api.adsabs.harvard.edu/v1/search/query?q=bibcode:2017NewA...55...32F&fl=bibcode,links_data'

The links_data json structure shows the availability of a link of type "preprint" (which is the arXiv link) and one of type "electr" (which is the publisher article).

dev-jonghoonpark commented 7 years ago

"links_data" field isn't described in search.md please add that information to search.md

aaccomazzi commented 7 years ago

links_data is not a searchable field, so you can't query against it. It is there to simply carry information useful for linking out via the ADS link resolver. A complete list of fields/operators is available here: https://adsabs.github.io/help/search/comprehensive-solr-term-list

dev-jonghoonpark commented 7 years ago

I didn't know that list exist ;( so i thought fields in search.md are every thing

could you add link for available fields list? (like doctype) for beginner like me.

like this.

fl

Fields list: specify the fields contained in each returned document. Value should be a comma-separated list of field names. (see here for a list of fields)

aaccomazzi commented 7 years ago

Fixed in https://github.com/adsabs/adsabs-dev-api/commit/3c6a6cab4bcd4f14482e1eb6c8bcddcd02e24aff