<?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: Prioritise one entry over another in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604322#M210191</link>
    <description>&lt;P&gt;Thanks - simple when you think about it, I was doing a similar thing but allocating a score as I appended each loading, then score&amp;lt;= the results.&lt;BR /&gt;But this is eloquent - Thanks implemented and working perfectly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jul 2022 11:25:04 GMT</pubDate>
    <dc:creator>DaveBunn</dc:creator>
    <dc:date>2022-07-04T11:25:04Z</dc:date>
    <item>
      <title>How to prioritize one entry over another in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604237#M210177</link>
      <description>&lt;P&gt;SO I have a data set&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;User&amp;nbsp; &amp;nbsp; &amp;nbsp; Vehicle&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;User_a&amp;nbsp; &amp;nbsp; Car&lt;BR /&gt;User_b&amp;nbsp; &amp;nbsp; Car&lt;BR /&gt;User_a&amp;nbsp; &amp;nbsp; MotorBike&lt;BR /&gt;User_c&amp;nbsp; &amp;nbsp; MotorBike&lt;BR /&gt;User_d&amp;nbsp; &amp;nbsp; Car&lt;BR /&gt;User_c&amp;nbsp; &amp;nbsp; Bicycle&lt;BR /&gt;User_a&amp;nbsp; &amp;nbsp; Bicycle&lt;BR /&gt;User_c&amp;nbsp; &amp;nbsp; Scooter&lt;BR /&gt;User_e&amp;nbsp; &amp;nbsp; Car&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;What I need is to be able to run a search against this type of dataset and pull out only one return per username based upon those with a CAR, then Motorbike, then bicycle then scooter.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;But I only need ONE return for any given user - if they have all four - based upon priority they are reported as a car owner.&amp;nbsp; If they only have two or three of the four, they only get reported as the owner of the highest priority vehicle.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;I'm currently doing a search cars, score 1pt, append motobike score 2pt, and so on but that is slow on a big datasaet.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 16:21:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604237#M210177</guid>
      <dc:creator>DaveBunn</dc:creator>
      <dc:date>2022-07-05T16:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Prioritise one entry over another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604244#M210178</link>
      <description>&lt;P&gt;I'd eval a var with the point values in a case statement car highest number and so on. Then I'd stat the results of the search max(value) by user, afterward you could then eval a new field with the text values based on the number returned in the max(value). Might not be efficient but would be easy to read and keep updated if new vehicle types are added.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jul 2022 14:56:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604244#M210178</guid>
      <dc:creator>jami7</dc:creator>
      <dc:date>2022-07-02T14:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Prioritise one entry over another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604245#M210179</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval vehicle_score=case(Vehicle="Car",1,Vehicle="MotorBike",2,Vehicle="Bicycle",3,Vehicle="Scooter",4)
| stats min(vehicle_score) as vehicle_score by User
| eval Vehicle=case(vehicle_score=1,"Car",vehicle_score=2,"MotorBike",vehicle_score=3,"Bicycle",vehicle_score=4,"Scooter")&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 02 Jul 2022 14:56:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604245#M210179</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-02T14:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Prioritise one entry over another</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604322#M210191</link>
      <description>&lt;P&gt;Thanks - simple when you think about it, I was doing a similar thing but allocating a score as I appended each loading, then score&amp;lt;= the results.&lt;BR /&gt;But this is eloquent - Thanks implemented and working perfectly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jul 2022 11:25:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-prioritize-one-entry-over-another-in-search/m-p/604322#M210191</guid>
      <dc:creator>DaveBunn</dc:creator>
      <dc:date>2022-07-04T11:25:04Z</dc:date>
    </item>
  </channel>
</rss>

