Views result sorting using arguments Is there any option available in Drupal views to sort views result using the arguments provided (contextual filters)

I am trying to integrate a search functionality using views. My problem is that contextual filter will list only matching results, I need all the results but it should sort according to the arguments passed using contextual filters. Is that possible?

I.E.   I pass the following string to a contextual NID argument:
1099+1100+1102+1098+1101+1097

I expect the order of the nodes in the view to be the same as the order as passed in through the argument.
This is what helped for me.

https://stackoverflow.com/a/2474164/28672

Using the second option to generate the view manually then modifying the array in the result property.

And this is the code I used to sort the results to the argument

 // Sort the view based on the argument now we've generated it.
  $results = $view-&gt;result;
  $view_argument_array = explode('+', '1099+1100+1102+1098+1101+1097');
  $new_result_order = array();
  foreach ($view_argument_array as $nid) {
    foreach ($results as $result) {
      if ($result-&gt;nid == $nid) {
        $new_result_order[] = $result;
      }
    }
  }
  $view-&gt;result = $new_result_order;