0

Using the results from search.termextract

Hi all,

I can retrieve search terms from a query like so:

select * from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)

however this returns results like this:

<results>
<Result xmlns="urn:yahoo:cate">murray darling basin</Result>
<Result xmlns="urn:yahoo:cate">satellite data</Result>
<Result xmlns="urn:yahoo:cate">harbours</Result>
<Result xmlns="urn:yahoo:cate">sydney</Result>
</results>

I then try and use these results is a subquery:

select * from flickr.photos.search where text in (
select * from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)
)

I think this is because of my use of '*' in the sub-query, but any attempt to use a column name fails...

fail: select result from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)
fail: select Result from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)

anyone got any pointers for me?


neil

by
1 Reply
  • Use "select content from search.termextract...".

    QUOTE (wilf @ May 19 2009, 02:49 PM) <{POST_SNAPBACK}>
    Hi all,

    I can retrieve search terms from a query like so:

    select * from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)

    however this returns results like this:

    <results>
    <Result xmlns="urn:yahoo:cate">murray darling basin</Result>
    <Result xmlns="urn:yahoo:cate">satellite data</Result>
    <Result xmlns="urn:yahoo:cate">harbours</Result>
    <Result xmlns="urn:yahoo:cate">sydney</Result>
    </results>

    I then try and use these results is a subquery:

    select * from flickr.photos.search where text in (
    select * from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)
    )

    I think this is because of my use of '*' in the sub-query, but any attempt to use a column name fails...

    fail: select result from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)
    fail: select Result from search.termextract where context in (select description from rss where url="http://d.yimg.com/au.rss.news.yahoo.com/top_stories.xml" limit 1)

    anyone got any pointers for me?


    neil
    0

Recent Posts

in YQL