If you need to produce a transaction saved search whose results might include Journal Entries (JEs) and you want to ensure that every transaction shows up exactly once, use criterion “Line Sequence Number = 0” instead of “Line = 0” or “Main Line = true”. This is because Line 0 is not guaranteed to exist on JEs.
The output for the bill is the typical pattern in NetSuite where an additional line is used to represent header information. This is evident from the fact that the bill line with an asterisk has the same value for Memo and Memo (Main) which corresponds to the value we entered in the header-level memo field.
Unlike other transactions types in NetSuite, all JE lines are marked as main line and there is no separate line to capture the header-level info. This detail must be taken into account when creating saved searches that include JEs.
To address the previously identified challenge, two fields come to mind: Line (a.k.a. Line ID) and Line Sequence Number. However, these fields have different semantics and only Line Sequence Number meets our specific needs.

As seen from the above comparison, while Line ID and Line Sequence Number are guaranteed to be unique per transaction, only Line Sequence Number is guaranteed to be sequential starting from zero and counting up. This might seem confusing at first because, in most cases, both fields actually have the same values.
Revisiting our earlier example, the bill lines and JE lines initially both had sequential Line IDs and Line Sequence Numbers starting at zero
Whereas Line IDs are static and not reused on the same transaction. Line Sequence Numbers are dynamic and recomputed based on the actual number of lines at any given time. Thus, there is no guarantee that Line 0 will exist on a given JE.
Do not be misled to incorrectly conclude that Line ID should be avoided at all times. On the contrary, there are situations where it is very valuable (typically in SuiteScript contexts). Here are a few:
Divergence between Line ID and Line Sequence Number can be used to detect deletions.
Line ID (script ID: line) or Line Unique Key (script ID: lineuniquekey) is useful to target a specific line via code as they are both guaranteed to always refer to the exact same line all the time. Think of these as a sort of internal ID of the line which by definition is unique and immutable. Line ID (script ID: line) on the other hand, cannot be relied on in such cases as it is mutable.