Regarding relevance, the calculation done for relevancy score is not direct and is complex, it is based on field length norm, term frequency and many other factors (which cannot be controlled directly). Field length norm is based on the size of the data of the field. Also, custom field included in search would have a separate weight.
The relevance calculation is based on elasticsearch. Regarding relevance explanation, please refer the links below: