laravel-scout-tntsearch-driver icon indicating copy to clipboard operation
laravel-scout-tntsearch-driver copied to clipboard

Search as you type

Open impactcolor opened this issue 6 years ago • 4 comments

I can't find any documentation to this so I apologize for newbie question. I got this working but how can I get it working with "as you type" display search results? Currently I have to hit "search". I would like it to be that it displays results as I type.

impactcolor avatar Jun 20 '18 08:06 impactcolor

Is there any documentation on how to use Fuzzy or asyoutype? I guess this is what I'm looking for but documentation on google is scarce.

impactcolor avatar Jun 25 '18 18:06 impactcolor

Hey @impactcolor so the underlining library for this is https://github.com/teamtnt/tntsearch

Fuzzy/fuzziness is essentially allowing for typing mistakes. For instance if you have the text "Rick" and you search "Rikc" then it would return. I think as you type provides results from 1 letter searches. Looking at the test for this - https://github.com/teamtnt/tntsearch/blob/de6922a20bf2fe7c8b2fd97c18dfb11fadc9bd1d/tests/TNTSearchTest.php#L223 they search one letter and the result is returned.

I did have the same questions but managed to figure it out after some digging 👍

Also, super late response but thought I'd add this info if anyone else comes across this issue like I did :)

rickbolton avatar Nov 09 '18 13:11 rickbolton

@rickbolton Thanks. I'm still scratching my head a bit, but it makes sense I guess.

pedzed avatar Nov 22 '19 21:11 pedzed

It doesn't seem to work if boolean search is enabled. It's either-or.

pedzed avatar Nov 22 '19 23:11 pedzed