Drupal Views Exposed Filters with approximate matches

118 views Asked by At

I've got a view with exposed filters to help find matches out of thousands of entries. What I'm looking for is exact matches up top (this is done and working) followed by "approximate" matches underneath. The approximate matches may have one or two elements that are not what the user specified, but should be presented as options anyway. Are there any modules that support this functionality?

1

There are 1 answers

0
EJK On

You could create 2 different views. One being the page you already created with the exposed filter, and the other being a block with almost the exact same settings, but make the filter less strict (ex. "contains" vs. "is equal to"). Then you could print the block below your results on the page, possibly in the footer, and call it something along the lines of "Approximate Matches". If you're not sure how to print a block, there's a good description here.

There may be a more efficient way of doing this, but this is the first thing that came to mind.