<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: subsearch help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198698#M57496</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
Try this if you don't have overlapping records.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xx|fields user_id,movie_id,rating|sort - rating|head 20|join movie_id[|search sourcetype=yy|fields movie_id,name]|table movie_id,movie_name,rating
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We may also have many movies with same rating:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xx|fields user_id,movie_id,rating|top 20 rating by user_id,movie_id|fields user_id,movie_id,rating|join movie_id[|search sourcetype=yy|fields movie_id,movie_name]|table movie_id,movie_name,rating
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;updated query per user input (use as it is)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=rate |fields rate_user_id,rate_movie_id,rate_rating,rate_duration|sort - rate_rating | head 20| rename rate_movie_id as movie_id | join movie_id [search sourcetype = movie | fields movie_id, movie_name]|table movie_id, movie_name, rate_rating
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Jan 2014 10:17:46 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2014-01-09T10:17:46Z</dc:date>
    <item>
      <title>subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198697#M57495</link>
      <description>&lt;P&gt;i have a two tables&lt;BR /&gt;
one is rating &lt;BR /&gt;
user_id=xxxx&lt;BR /&gt;
movie_id = zzzz&lt;BR /&gt;
rating = yyyy &lt;/P&gt;

&lt;P&gt;second is movie&lt;BR /&gt;
movie_id = kkkk&lt;BR /&gt;
name = pppp&lt;/P&gt;

&lt;P&gt;using this field i want to find the 20 top rated moive name &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198697#M57495</guid>
      <dc:creator>changwoo</dc:creator>
      <dc:date>2020-09-28T15:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198698#M57496</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
Try this if you don't have overlapping records.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xx|fields user_id,movie_id,rating|sort - rating|head 20|join movie_id[|search sourcetype=yy|fields movie_id,name]|table movie_id,movie_name,rating
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We may also have many movies with same rating:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=xx|fields user_id,movie_id,rating|top 20 rating by user_id,movie_id|fields user_id,movie_id,rating|join movie_id[|search sourcetype=yy|fields movie_id,movie_name]|table movie_id,movie_name,rating
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;updated query per user input (use as it is)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=rate |fields rate_user_id,rate_movie_id,rate_rating,rate_duration|sort - rate_rating | head 20| rename rate_movie_id as movie_id | join movie_id [search sourcetype = movie | fields movie_id, movie_name]|table movie_id, movie_name, rate_rating
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jan 2014 10:17:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198698#M57496</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-01-09T10:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198699#M57497</link>
      <description>&lt;P&gt;you can move "sort" and "head" before "join" as well, for little better performance.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2014 14:44:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198699#M57497</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-09T14:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198700#M57498</link>
      <description>&lt;P&gt;Thank you for the suggestion, i have changed it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jan 2014 16:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198700#M57498</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-01-09T16:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198701#M57499</link>
      <description>&lt;P&gt;| join is not working.. &lt;/P&gt;

&lt;P&gt;sourcetype=rate |fields rate_user_id,rate_movie_id,rate_rating,rate_duration|sort -rate_rating | head 20| join rate_movie_id[|search sourcetype = movie | fields movie_id, movie_name]|table movie_id, movie_name, rate_rating&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:37:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198701#M57499</guid>
      <dc:creator>changwoo</dc:creator>
      <dc:date>2020-09-28T15:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198702#M57500</link>
      <description>&lt;P&gt;sourcetype=rate|fields rate_user_id,rate_movie_id,rate_rating,rate_duration|top 1 rate_rating by rate_movie_id&lt;/P&gt;

&lt;P&gt;this is working very well &lt;/P&gt;

&lt;P&gt;i deleted the space and inserted "|" &lt;/P&gt;

&lt;P&gt;but no result is comming out . &lt;/P&gt;

&lt;P&gt;this is my search command&lt;/P&gt;

&lt;P&gt;sourcetype=rate|fields rate_user_id,rate_movie_id,rate_rating,rate_duration|top 1 rate_rating by rate_movie_id | join rate_movie_id[ | search sourcetype= movie | fields movie_id, movie_name] | table movie_id, movie_name, rate_rating&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198702#M57500</guid>
      <dc:creator>changwoo</dc:creator>
      <dc:date>2020-09-28T15:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198703#M57501</link>
      <description>&lt;P&gt;do I have to add comparing command?&lt;/P&gt;

&lt;P&gt;looking to my search command there is no comparing command&lt;/P&gt;

&lt;P&gt;like rate_movie_id quals movie_id&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:37:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198703#M57501</guid>
      <dc:creator>changwoo</dc:creator>
      <dc:date>2020-09-28T15:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: subsearch help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198704#M57502</link>
      <description>&lt;P&gt;rate_movie_id and movie_id are related you will get the result or we are doing nothing with this query.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/subsearch-help/m-p/198704#M57502</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2020-09-28T15:37:42Z</dc:date>
    </item>
  </channel>
</rss>

