Rate document by term offset or location

I know that text search can show the location or offset of a term found.
can I build a function that can rate or boost the doc by the offset location?
for example if searching fox:
"brown fox jumping over yellow fence"
will be rated more than:
"over yellow fence, a brown fox jumping"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.