private void initializeForward() {
		if (isInitialized) {
			return;
		}
		startIndex = -1;

		if (startLocation != null) {
			if (startLocation.getAddress().equals(currentAddress)) {
				// set the current Field index to correspond to the program location
				for (int i = 0; i < currentLayout.getNumFields(); i++) {
					Field f = currentLayout.getField(i);
					if ((f instanceof ListingField field) && getFieldForLocation(field, i)) {
						break;
					}
				}
			}
		}
		isInitialized = true;
	}
Returns the number of fields used in the match.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchtext/ListingDisplaySearcher.java