Consistent query score of path_hierarchy tokenized field

My goal is to be able to search and get results for,,, and

I indexed the field with a path_hierarchy tokenizer with token order
reversed and the lowercase token filter for the domain names.

I have tried to limit the matches with min_score, and the _score is not
consistent from one search to another.

I think what I need a score based on the parts of the path that match. A
query for must score as 3, as
2, as 2, as 1, etc.

My idea of how to achieve this goal is to use a match query and then
rescore the search with a script.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit