Reputation: 734
In my Java project, i am using the GSA Java API as an helper querying and getting results of a search. According to the API documentation, i believe i have done everything correct by the book. To test my first search operation, i have construct following URL
URL: http://myHOST:myPORT/search?access=p&output=xml&client=&lr=tr&num=100&site=myXMLCollection
and post it to the API hoping i was getting the results. But HTTP 502 error shows up.
java.io.IOException: Server returned HTTP response code: 502 for URL: http://myHOST:myPORT/search?access=p&output=xml&client=&lr=tr&num=100&site=myXMLCollection
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
at java.net.URL.openStream(URL.java:1037)
at net.sf.gsaapi.GSAClient.search(Unknown Source)
at net.sf.gsaapi.GSAClient.getGSAResponse(Unknown Source)
at net.sf.gsaapi.GSAClient.getGSAResponse(Unknown Source)
Am i missing something among the sent parameters?
Upvotes: 0
Views: 234
Reputation: 458
I could see couple of fields missing in your query. Add the below parameters.
q=your term
. If you are using java api, then set
the query term using setQueryTerm(term) method. lr=lang_tr
,if
language is Turkish.Regards, Mohan
Upvotes: 1