<?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: How to do a relational search by getting a partial string as key from a subsearch? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250742#M74923</link>
    <description>&lt;P&gt;&lt;CODE&gt;sourcetype=my_log apples&lt;/CODE&gt;&lt;BR /&gt;
will return only record 2, and ignore record 1. Is that the use case you need? Or are you trying to find more generic data? If you post a sample of the actual data it would help. &lt;/P&gt;

&lt;P&gt;Just reread your question, I guess you're stuck with apple as the input? If its a token just append s, eg &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=my_log $inputToken$s&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2015 16:53:30 GMT</pubDate>
    <dc:creator>jplumsdaine22</dc:creator>
    <dc:date>2015-11-25T16:53:30Z</dc:date>
    <item>
      <title>How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250741#M74922</link>
      <description>&lt;OL&gt;
&lt;LI&gt;2015-11-26 22:40:25,394 [] scheduled test:refs/changes/69/131269/1 to [6d230057] push  &lt;A href="http://user@example.com:9441/test/abc.git"&gt;http://user@example.com:9441/test/abc.git&lt;/A&gt; to run after 5s&lt;/LI&gt;
&lt;LI&gt;2015-11-26 22:40:25,395 [] scheduled test:refs/changes/69/131269/1 to [2d7bc846] push &lt;A href="http://user@example.com:9441/test/abc.git"&gt;http://user@example.com:9441/test/abc.git&lt;/A&gt; to run after 5s&lt;/LI&gt;
&lt;LI&gt;2015-11-26 22:40:30,394 [6d230057] Replication to &lt;A href="http://user@example.com:9441/test/abc.git"&gt;http://user@example.com:9441/test/abc.git&lt;/A&gt; started...&lt;/LI&gt;
&lt;LI&gt;2015-11-26 22:40:30,395 [2d7bc846] Replication to &lt;A href="http://user@example.com:9491/test/abc.git"&gt;http://user@example.com:9491/test/abc.git&lt;/A&gt; started... &lt;/LI&gt;
&lt;LI&gt;2015-11-26 22:40:33,293 [6d230057] Replication to &lt;A href="http://user@example.com:9441/test/abc.git"&gt;http://user@example.com:9441/test/abc.git&lt;/A&gt; completed in 2898 ms&lt;/LI&gt;
&lt;LI&gt;2015-11-26 22:40:32,334 [2d7bc846] Replication to &lt;A href="http://user@example.com:9491/test/abc.git"&gt;http://user@example.com:9491/test/abc.git&lt;/A&gt; completed in 1938 ms&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Now I only have "131269" and "example.com:9491" as the input parameters,&lt;BR /&gt;
and I want to find out No.4 and No.6 records listed above.&lt;/P&gt;

&lt;P&gt;Thank you! &lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 11:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250741#M74922</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2015-11-25T11:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250742#M74923</link>
      <description>&lt;P&gt;&lt;CODE&gt;sourcetype=my_log apples&lt;/CODE&gt;&lt;BR /&gt;
will return only record 2, and ignore record 1. Is that the use case you need? Or are you trying to find more generic data? If you post a sample of the actual data it would help. &lt;/P&gt;

&lt;P&gt;Just reread your question, I guess you're stuck with apple as the input? If its a token just append s, eg &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=my_log $inputToken$s&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 16:53:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250742#M74923</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-11-25T16:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250743#M74924</link>
      <description>&lt;P&gt;Assuming that you have fields extracted for each of the key data items, you can do this easily:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=my_log
| stats latest(inventory_count) as count by stock_key name store
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where the variables have the following values, using your example:&lt;BR /&gt;
inventory_count = 123&lt;BR /&gt;
stock_key = 123456&lt;BR /&gt;
name = apples&lt;BR /&gt;
store = A&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:59:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250743#M74924</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-29T07:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250744#M74925</link>
      <description>&lt;P&gt;And of course, you might want to do the selection as part of the base search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=my_log *apple*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;would work easily&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2015 22:07:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250744#M74925</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2015-11-25T22:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250745#M74926</link>
      <description>&lt;P&gt;sorry, my fault, let's assume that the second record is like this, there is no "apples" in it  : 2015-11-25 18:35:05 [123456] there are 123 in A stock.  can I search the second record only by input token "apple"&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 04:19:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250745#M74926</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2015-11-26T04:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250746#M74927</link>
      <description>&lt;P&gt;the second record is like this, there is no "apples" in it : 2015-11-25 18:35:05 [123456] there are 123 in A stock. Can I find out the second record only by the input token "apple"?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 04:21:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250746#M74927</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2015-11-26T04:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250747#M74928</link>
      <description>&lt;P&gt;sorry, my fault, let's assume that the second record is like this, there is no "apples" in it : 2015-11-25 18:35:05 [123456] there are 123 in A stock. can I find out the second record only by input token "apple" ?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 04:24:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250747#M74928</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2015-11-26T04:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250748#M74929</link>
      <description>&lt;P&gt;Not unless there is some commonality between the two events. For example are any of these common between the two events? &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;The number you have in brackets  &lt;A href="https://community.splunk.com/extract%20that%20field%20with%20%60rex%60%20and%20then%20search%20on%20that%20field"&gt;123456&lt;/A&gt;
-The time the event occurs ( look at the &lt;CODE&gt;transaction&lt;/CODE&gt; command)&lt;/LI&gt;
&lt;LI&gt;The phrase "A Stock" (search for that instead of apple)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Otherwise I suspect the answer to your question is "No, you can't". Once again if you post actual data samples along with a design of what you want the search result to look like (eg the actual results table or chart you are after)  we can probably help you better. &lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 14:27:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250748#M74929</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-11-26T14:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250749#M74930</link>
      <description>&lt;P&gt;Extract out the commit hash, then build up your search from there. EG:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=my_log example.com:9491 (131269 or Replication )| rex field=_raw "^.*\[(?&amp;amp;#60;commit_hash&amp;amp;#62;\w.*?)\]" | stats values(_raw) by commit_hash
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should return something like this (&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| commit_hash      | _raw                                                                                        
    6d230057       | 2015-11-26 22:40:25,394 [] scheduled test:refs/changes/69/131269/1 to [6d230057] push &lt;A href="http://user@exam" target="test_blank"&gt;http://user@exam&lt;/A&gt;
                   | 2015-11-26 22:40:30,394 [6d230057] Replication to &lt;A href="http://user@example.com:9441/test/abc.git" target="test_blank"&gt;http://user@example.com:9441/test/abc.git&lt;/A&gt; started...
                   | 2015-11-26 22:40:33,293 [6d230057] Replication to &lt;A href="http://user@example.com:9441/test/abc.git" target="test_blank"&gt;http://user@example.com:9441/test/abc.git&lt;/A&gt; completed in 
     2d7bc846      | 2015-11-26 22:40:25,395 [] scheduled test:refs/changes/69/131269/1 to [2d7bc846] push &lt;A href="http://user@example" target="test_blank"&gt;http://user@example&lt;/A&gt;
                   | 2015-11-26 22:40:30,395 [2d7bc846] Replication to &lt;A href="http://user@example.com:9491/test/abc.git" target="test_blank"&gt;http://user@example.com:9491/test/abc.git&lt;/A&gt; started...
                   | 2015-11-26 22:40:32,334 [2d7bc846] Replication to &lt;A href="http://user@example.com:9491/test/abc.git" target="test_blank"&gt;http://user@example.com:9491/test/abc.git&lt;/A&gt; completed i
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;pipe a search in after stats if you want to filter down further. You shouldn't need a subsearch &lt;BR /&gt;
See &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.1/SearchReference/Rex"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.1/SearchReference/Rex&lt;/A&gt; for more details on rex&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2015 18:21:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250749#M74930</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-11-26T18:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250750#M74931</link>
      <description>&lt;P&gt;so much appreciated! I just upload my actual data to original post, hope that would be help.&lt;BR /&gt;
thank you again&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2015 01:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250750#M74931</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2015-11-27T01:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250751#M74932</link>
      <description>&lt;P&gt;For some reason The editor is dropping the capture group name. The full rex command should be &lt;/P&gt;

&lt;P&gt;rex field=_raw "^.#42;\[(?&amp;lt;commit_hash&amp;gt;\w.#42;?)\]"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:58:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250751#M74932</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2020-09-29T07:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250752#M74933</link>
      <description>&lt;P&gt;I use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"sourcetype=my_log (example.com:9442 OR example.com:9441) (131676 OR Replication) | rex field=_raw "^.*\[(?&amp;lt;commit_hash&amp;gt;\w.*?)\]" | stats values(_raw) by commit_hash | search commit_hash"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;to get result, but it return "no results found".&lt;/P&gt;

&lt;P&gt;Is there anything I miss?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 02:01:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250752#M74933</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2015-11-30T02:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250753#M74934</link>
      <description>&lt;P&gt;Do you get results for &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=my_log (example.com:9442 OR example.com:9441) (131676 OR Replication) | rex field=_raw "^.*\[(?&amp;lt;commit_hash&amp;gt;\w.*?)\]" | stats values(_raw) by commit_hash
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 09:28:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250753#M74934</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-11-30T09:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250754#M74935</link>
      <description>&lt;P&gt;yes, it shows two columns, commit_hash at the left column and matched data at the right column. but if I append "| search commit_hash", it shows no result&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250754#M74935</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2020-09-29T08:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250755#M74936</link>
      <description>&lt;P&gt;Make sure you are  supply a value for the field to search, eg:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| search commit_hash=&amp;lt;some value here&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also stats values(_raw) was just an example. It's probably better to run &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| stats values(*)  as * by commit_hash
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will make sure you get all the fields, so you can do further aggregation commands.  Have a search through splunk ansers for stats values and chart values for some great examples. &lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 10:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250755#M74936</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-12-01T10:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250756#M74937</link>
      <description>&lt;P&gt;When I use &lt;CODE&gt;sourcetype=my_log (example.com:9442 OR example.com:9441) (131676 OR Replication) | rex field=_raw "^.*\[(?\w.*?)\]"&lt;/CODE&gt;  without stats ..., it shows logs include (131676 OR Replication). that's right here.&lt;/P&gt;

&lt;P&gt;while I append &lt;CODE&gt;stats values ...&lt;/CODE&gt;, then it just shows results that matched the regex. It is make sense here, too.&lt;/P&gt;

&lt;P&gt;Now the problem is I want to use the result (commit_hash) to find out log those contain these commit hash. It does not make any sense if I append search commit_hash to to end of stats...&lt;/P&gt;

&lt;P&gt;Because after stats(), it only left the regex matched result, but what I want to search in is those logs that contain (131676 OR Replication).  regex is just the way I grab commit_hash Ids. so I am thinking that I might need a subsearch?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:01:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250756#M74937</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2020-09-29T08:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250757#M74938</link>
      <description>&lt;P&gt;Are we still using your example data in your question? &lt;/P&gt;

&lt;P&gt;I suggested you append a search command to filter down the list, but I'm not sure how you want to filter it. Are you trying to exclude all but a single commit hash? Or do you want to use the commit hashes to search a different log? I'm confused. Originally you said you want records 4 &amp;amp; 6 but now you say you want all the records?&lt;/P&gt;

&lt;P&gt;Can you provide an example of what you want the result to be? Based on the example data you originally provided.&lt;/P&gt;

&lt;P&gt;Of course if you just want to use  the commit hashes to search another source then make the search string a subsearch. EG&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=my_other_log [search sourcetype=my_log (example.com:9442 OR example.com:9441) (131676 OR Replication) | rex field=_raw "^.*\[(?&amp;lt;commit_hash&amp;gt;\w.*?)\]" | dedup commit_hash | fields commit_hash | rename commit_hash as query]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(The rename command at the end of the subsearch removes the 'commit_hash=' from the returned values. See &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.1511/Search/Changetheformatofsubsearchresults"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.1511/Search/Changetheformatofsubsearchresults&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 11:44:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250757#M74938</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-12-01T11:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250758#M74939</link>
      <description>&lt;P&gt;yes! your solution above is exactly what I want!!!!&lt;BR /&gt;
I am still using that example in the original post.&lt;BR /&gt;
There is only one log(my_log), but if we use &lt;STRONG&gt;stats()..&lt;/STRONG&gt;. then the result will be filtered as only record 1 &amp;amp; 2, there will not be any 3,4,5,6 records left. So it is impossible to find out 4 &amp;amp; 6 depend on that filtered result.&lt;/P&gt;

&lt;P&gt;the finally search string is:&lt;BR /&gt;
&lt;CODE&gt;sourcetype=my_log [search sourcetype=my_log (example.com:9442 OR example.com:9441) (131676 OR Replication) | rex field=_raw "^.*to.*\[(?\w.*?)\]" | dedup commit_hash | fields commit_hash | rename commit_hash as query]&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and I can get record 4 &amp;amp; 6.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 13:16:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250758#M74939</guid>
      <dc:creator>chris93b</dc:creator>
      <dc:date>2015-12-01T13:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a relational search by getting a partial string as key from a subsearch?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250759#M74940</link>
      <description>&lt;P&gt;You're going to get 3 &amp;amp; 5 as well though. Is that ok?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 13:23:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-a-relational-search-by-getting-a-partial-string-as-key/m-p/250759#M74940</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2015-12-01T13:23:38Z</dc:date>
    </item>
  </channel>
</rss>

