adsabs / adsws

ADS web services
Other
2 stars 14 forks source link

keep-alive header causes queries to fail (!?!) #113

Closed romanchyla closed 7 years ago

romanchyla commented 7 years ago

In Firefox (BBB), the following query gets produced:

(python) solrjmeter master → curl 'https://api.adsabs.harvard.edu/v1/search/query?fl=title%2Cabstract%2Cbibcode%2Cauthor%2Ckeyword%2Cid%2Ccitation_count%2C%5Bcitations%5D%2Cpub%2Caff%2Cvolume%2Cpubdate%2Cdoi%2Cpub_raw%2Clinks_data%2Cproperty%2Cemail&hl=true&hl.fl=title%2Cabstract%2Cbody%2Cack&hl.maxAnalyzedChars=150000&hl.requireFieldMatch=true&hl.usePhraseHighlighter=true&q=identifier%3A2016ApJ...833...72B%20OR%20identifier%3A2016ApJ...833...71A%20%20OR%20identifier%3A2016ApJ...833...69D&rows=25&sort=date%20desc%2C%20bibcode%20desc&start=0' -H 'Host: api.adsabs.harvard.edu' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Bearer:TOKEN' -H 'Referer: https://ui.adsabs.harvard.edu/' -H 'origin: https://ui.adsabs.harvard.edu' -H 'Connection: keep-alive'
{"responseHeader":{"status":0,"QTime":2,"params":{"q":"identifier:2016ApJ...833...72B OR identifier:2016ApJ...833...71A  OR identifier:2016ApJ...833...69D","hl":"true","hl.maxAnalyzedChars":"150000","hl.requireFieldMatch":"true","fl":"title,abstract,bibcode,author,keyword,id,citation_count,[citations],pub,aff,volume,pubdate,doi,pub_raw,links_data,property","start":"0","hl.usePhraseHighlighter":"true","sort":"date desc, bibcode desc","hl.fl":"title,abstract,body,ack","rows":"25","wt":"json"}},"response":{"numFound":0,"start":0,"docs":[]},"highlighting":{}}

If I remove the keep-alive header, results come:

(python) solrjmeter master → curl 'https://api.adsabs.harvard.edu/v1/search/query?fl=title%2Cabstract%2Cbibcode%2Cauthor%2Ckeyword%2Cid%2Ccitation_count%2C%5Bcitations%5D%2Cpub%2Caff%2Cvolume%2Cpubdate%2Cdoi%2Cpub_raw%2Clinks_data%2Cproperty%2Cemail&hl=true&hl.fl=title%2Cabstract%2Cbody%2Cack&hl.maxAnalyzedChars=150000&hl.requireFieldMatch=true&hl.usePhraseHighlighter=true&q=identifier%3A2016ApJ...833...72B%20OR%20identifier%3A2016ApJ...833...71A%20%20OR%20identifier%3A2016ApJ...833...69D&rows=25&sort=date%20desc%2C%20bibcode%20desc&start=0' -H 'Host: api.adsabs.harvard.edu' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Content-Type: application/x-www-form-urlencoded' -H 'Authorization: Bearer:TOKEN' -H 'Referer: https://ui.adsabs.harvard.edu/' -H 'origin: https://ui.adsabs.harvard.edu' > /dev/null
romanchyla commented 7 years ago

sorry, not fail - they return 0 hits (!)

romanchyla commented 7 years ago

the problem was caused by data synchronization