I know it's not nice but one of the things I'm finding more useful with long and complex searches are comments and comments are not supported in the query language so this is what I usually include instead:
| eval comment1 = "
# the code below is doing X, Y, Z
| verycomplexcode doing X, Y, Z
| eval comment2 = "
# the code below is doing A, B, C
| verycomplexcode doing A, B, C
| fields - comment*
Another thing I found extremely useful in order to make your queries more readable is to add new lines before you pipe a command (see above) or extra indentation for subsearches, joins, etc (anything that requires square brackets).