Raghuveersingh / google-ajax-apis

Automatically exported from code.google.com/p/google-ajax-apis
0 stars 0 forks source link

the parameter ned=... (e.g. de_at) is not working in news search in conjunction with scoring parameter #252

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I search for news with the search API somehow like that
http://ajax.googleapis.com/ajax/services/search/news?q=arnold+schwarzenegger&sta
rt=0&api_key=<API_KEY>&v=1.0&hl=de&scoring=d&ned=de_at
2. The result shows only results in english as well as in german
3. It should show results ONLY in german

What is the expected output? What do you see instead?
The expected output are news in german.
Instead i see news in english + german

What version of the product are you using? On what operating system?
Version 1.0, Server is a Debian Distr.

Please provide any additional information below.
With the use of the parameter ned=...
it should be possible to restrict the search result to a specific language.
Which isn't the case. As far as I have proven the disfunctionallity so far
it is in conjunction with use of the scoring=d parameter.
hl=de doesn't change the output

Regards Jeremy S.

Original issue reported on code.google.com by jeremy.solarz@gmail.com on 26 May 2009 at 2:18

GoogleCodeExporter commented 9 years ago
Jeremy --

Try using this:
searcher.setRestriction(google.search.Search.RESTRICT_EXTENDED_ARGS, 
{"lr":"lang_de"}); 

Take a look at this sample:
http://savedbythegoog.appspot.com/?id=ag5zYXZlZGJ5dGhlZ29vZ3ISCxIJU2F2ZWRDb2RlGK
KnpwEM

Original comment by lisba...@google.com on 2 Jun 2009 at 5:09

GoogleCodeExporter commented 9 years ago
Thank you for your posting, but i don't understand how this would be a solution
for my problem. I'm using a REST call (driven by AJAX) to access the search 
results
and it is not possible to switch to Javascript AJAX calls. 
You can try my search when you copy pase the url given in your browser window.
The results displayed will be german and english content mixed.

Any further suggestions.

Regards Jeremy

Original comment by jeremy.solarz@gmail.com on 3 Jun 2009 at 4:51

GoogleCodeExporter commented 9 years ago
Add &lr=lang_de to the end of your RESTful url. That's essentially what the
setRestriction method does in this case.

Original comment by jrgeer...@gmail.com on 3 Jun 2009 at 7:22

GoogleCodeExporter commented 9 years ago
Hi jrgeerdes,

I have done that with the URL + &lr=lang_de given and still getting weired 
results
(results are in english too) 
have you tried it with the URL i've used in my post?

Greetings Jeremy

Original comment by jeremy.solarz@gmail.com on 4 Jun 2009 at 7:28

GoogleCodeExporter commented 9 years ago
After some testing, I have found that omitting the scoring parameter returns 
results
in German, but if you include the scoring parameter, the results are in English,
regardless of the hl and lr parameters specified. Please confirm that you see 
this
behavior too.

Original comment by jrgeer...@gmail.com on 4 Jun 2009 at 8:07

GoogleCodeExporter commented 9 years ago
Thats exactly the point!

Original comment by jeremy.solarz@gmail.com on 4 Jun 2009 at 8:38