<?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 Is it possible to sort multi value field by word length? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-sort-multi-value-field-by-word-length/m-p/485120#M135776</link>
    <description>&lt;P&gt;is it possible to sort multi-value field by word length...if yes then how to.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 12:47:58 GMT</pubDate>
    <dc:creator>Jawahir</dc:creator>
    <dc:date>2023-04-26T12:47:58Z</dc:date>
    <item>
      <title>Is it possible to sort multi value field by word length?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-sort-multi-value-field-by-word-length/m-p/485120#M135776</link>
      <description>&lt;P&gt;is it possible to sort multi-value field by word length...if yes then how to.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 12:47:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-sort-multi-value-field-by-word-length/m-p/485120#M135776</guid>
      <dc:creator>Jawahir</dc:creator>
      <dc:date>2023-04-26T12:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: sort multi value field by word length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-sort-multi-value-field-by-word-length/m-p/485121#M135777</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
append the below code to your query,&lt;BR /&gt;
If you want calculate the length of entire multi value field and than sort&lt;BR /&gt;
 &lt;CODE&gt;...| eval mv_length = len(mv_field) | sort mv_length | fields - mv_length | ...&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If you want to calculate the length of each value in multi-value field,&lt;BR /&gt;
&lt;CODE&gt;...| mvexpand mv_field | eval length = len(mv_field) | mvcombine mv_field delim="," | sort length |...&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;accept the answer if it helps.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 13:25:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-sort-multi-value-field-by-word-length/m-p/485121#M135777</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-14T13:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: sort multi value field by word length</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-sort-multi-value-field-by-word-length/m-p/641404#M222222</link>
      <description>&lt;P&gt;This alternative worked for me. Where I wanted to expand a multivalue field, show the length and search for one above a certain length value:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| mvexpand Logon_ID | eval length = len(Logon_ID)| search length &amp;gt;5&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 09:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-sort-multi-value-field-by-word-length/m-p/641404#M222222</guid>
      <dc:creator>becksyboy</dc:creator>
      <dc:date>2023-04-26T09:45:12Z</dc:date>
    </item>
  </channel>
</rss>

