Good morning everyone. Is there a way to do a part...
# community-help
a
Good morning everyone. Is there a way to do a partial search on a specific field?
k
👋 Can you please elaborate with an example?
a
We have a field for phone numbers, along with various other fields we want to search, but for the phone number we need to match partials:
15155555050, but if someone were to search 5050 that would need to match.
k
Got it. You have to use infix search for it.
a
If I'm following correctly I need to both add infix: true to the data structure of the field itself and then infix: on in the query?
k
Correct
a
If I drop/add the field to add the infix is this going to drop all the data currently indexed?
k
No, it will just drop and recreate the in-memory index. For large collections, this could take some time.
a
Alright. Ty. Again, as usual, thanks for the quick responses. Your support is top notch.
🙌 1
Hey, quick question. With the site live and data constantly being indexed if I ran this right now would it have a negative affect on data being indexed, current searching, etc? Basically, do you recommend I do this after hours or is it no big deal?
k
Yes it will block both writes and reads.
I recommend creating a new collection and using an alias to switch if you can do that.
a
ok
k
Ofc, this is an area we want to improve in future.
a
Still a good product already. Thanks again!