Break the expression instead of that brace and then double brace later. I presume the `.equals` under `indexWhere` can be `==` as well.

```
val idSearchResponse = ContentApi.search(edition).ids(articles.mkString(",")).response
val idSearchResults = idSearchResponse map { _.results.map(new Content(_)) } 
val isSearchSortedResults = idSearchResults map { _.sortBy(t => articles.indexWhere(_ == t.id)) }

val idSearch = isSearchSortedResults fallbackTo Future(Nil)
```

If the extra chatter bothers you, you can use a function or hide the variables in a scope:

```
val idSearch = {
  val response = ContentApi.search(edition).ids(articles.mkString(",")).response
  val results = response map { _.results.map(new Content(_)) } 
  val sorted = results map { _.sortBy(t => articles.indexWhere(_ == t.id)) }
  
  sorted fallbackTo Future(Nil)
}
```