Implement phrase match in search (Lunr.js)

Bitwarden makes many of the features supported by Lunr.js search available, not not phrase matching.

e.g.

If I have 3 entries in my vault, with the names ‘fizz’, ‘buzz’, ‘fizz buzz’, currently searching ‘fizz buzz’ would return all three. I want to be able to add double quotes (") to my search to search based on phrase matching, so that searching “fizz buzz” would only return ‘fizz buzz’ from the above.

1 Like

@bw12384 Welcome to the forum!

Can you point me to where Lunr supports exact-phrase matching? Last time I checked it was not possible without using various work-arounds (which are unfortunately not supported in Bitwarden).

It appears it’s not supported out of the box, but I believe there are ways to support it.

This post points to a JS fiddle and explanation by users olivernn and icidasset. Maybe this could help?