0

answers.search queries limited to first 50 results only?

I am trying to use YQL to retrieve all questions and answers from Yahoo answers that contain the terms 'gene therapy'.
I tried the following query:

select * from answers.search(0) where query='gene therapy'

there were 0 results. According to documentation, this should return all results.

select * from answers.search where query='gene therapy'
returns 10 results

select * from answers.search(50) where query='gene therapy'
returns 50 results, as expected

select * from answers.search(51) where query='gene therapy'
returns 0 results

select * from answers.search(51,100) where query='gene therapy'
returns 0 results

I conclude that there must be a hard limit of the first 50 results only. Is this correct, or did I miss something? This was my hunch because the Yahoo Answers API also limits results to the first 50. Anyone know another way to do this?

by
1 Reply
  • Hi jlimcmmt,

    If you take a look to the answers api for search, you will realize that the api won't output more than 50 elements:
    http://developer.yahoo.com/answers/V1/questionSearch.html

    But you can ask for a maximum of 50 and it will work, taking your last example:
    select * from answers.search(0,50) where query='gene therapy' (first 50 answers)
    select * from answers.search(49,50) where query='gene therapy' (from 50 to 100)

    etc.

    Cheers,
    Francisco.



    QUOTE (jlimcmmt @ Oct 12 2010, 02:33 PM) <{POST_SNAPBACK}>
    I am trying to use YQL to retrieve all questions and answers from Yahoo answers that contain the terms 'gene therapy'.
    I tried the following query:

    select * from answers.search(0) where query='gene therapy'

    there were 0 results. According to documentation, this should return all results.

    select * from answers.search where query='gene therapy'
    returns 10 results

    select * from answers.search(50) where query='gene therapy'
    returns 50 results, as expected

    select * from answers.search(51) where query='gene therapy'
    returns 0 results

    select * from answers.search(51,100) where query='gene therapy'
    returns 0 results

    I conclude that there must be a hard limit of the first 50 results only. Is this correct, or did I miss something? This was my hunch because the Yahoo Answers API also limits results to the first 50. Anyone know another way to do this?
    0

Recent Posts

in YQL