Let me give you an example of what i called a very long and complex search, in the present case this concerns a prediction interface about IBM Mainframes CPU consummation, the user has various setting choices downstreamed by forms.
Also some periods (4) will provide the user a way to influence the result. (to integrate projects prevision and so on)
This kind of complex search will necessary be quite long...
search='index=$index$ report=$report$ PSERIES=$valuespseries$ curr_shared_proc_pool_name="DefaultPool" OR "Not_Applicable" earliest="$earlyval$" latest="$lateval$" PoolIdle>0 | eval conso=round(max_conso_pool,2) | eval percent_conso=(conso/CPU_active)*100 | eval percent_conso=round(percent_conso,2) | eval percent_conso_installed=(conso/CPU_installed)*100 | eval percent_conso_installed=round(percent_conso_installed,2) | where ( conso>0) AND ( percent_conso<100 ) | dedup _time,PSERIES | timechart span=$span$ max(conso) As max_conso | predict max_conso As Projection lower30=low upper30=high future_timespan=$future_timespan$ algorithm=$algorithm$ holdback=$holdback$ | eval Projection=if(_time>if("$manualtime_period1$" == "now", now(),strptime("$manualtime_period1$", "%d/%m/%Y")),Projection+$manualcpus_period1$,Projection) | eval Projection=if(_time>if("$manualtime_period2$" == "now", now(),strptime("$manualtime_period2$", "%d/%m/%Y")),Projection+$manualcpus_period2$,Projection) | eval Projection=if(_time>if("$manualtime_period3$" == "now", now(),strptime("$manualtime_period3$", "%d/%m/%Y")),Projection+$manualcpus_period3$,Projection) | eval Projection=if(_time>if("$manualtime_period4$" == "now", now(),strptime("$manualtime_period4$", "%d/%m/%Y")),Projection+$manualcpus_period4$,Projection) | eval low=if(_time>if("$manualtime_period1$" == "now", now(),strptime("$manualtime_period1$", "%d/%m/%Y")),low+$manualcpus_period1$,low) | eval low=if(_time>if("$manualtime_period2$" == "now", now(),strptime("$manualtime_period2$", "%d/%m/%Y")),low+$manualcpus_period2$,low) | eval low=if(_time>if("$manualtime_period3$" == "now", now(),strptime("$manualtime_period3$", "%d/%m/%Y")),low+$manualcpus_period3$,low) | eval low=if(_time>if("$manualtime_period4$" == "now", now(),strptime("$manualtime_period4$", "%d/%m/%Y")),low+$manualcpus_period4$,low) | eval high=if(_time>if("$manualtime_period1$" == "now", now(),strptime("$manualtime_period1$", "%d/%m/%Y")),high+$manualcpus_period1$,high) | eval high=if(_time>if("$manualtime_period2$" == "now", now(),strptime("$manualtime_period2$", "%d/%m/%Y")),high+$manualcpus_period2$,high) | eval high=if(_time>if("$manualtime_period3$" == "now", now(),strptime("$manualtime_period3$", "%d/%m/%Y")),high+$manualcpus_period3$,high) | eval high=if(_time>if("$manualtime_period4$" == "now", now(),strptime("$manualtime_period4$", "%d/%m/%Y")),high+$manualcpus_period4$,high)'|token_safe
Even with some optimization that would always be possible (and even without the story of four manual periods), you can easily see how it can be quite hard to read within a same string line
... View more