Moved distance critiera to elastic filter