Closed Patrick-Berg closed 4 years ago
I created a test case for this, and I can't reproduce your issue:
def testSearchPhoneNumber(self):
WatsonTestModel1.objects.create(
title="title model1 instance12",
content="content model1 instance13 +12 3456 7890123",
description="description model1 instance13",
)
self.assertEqual(watson.search("+12 3456 7890123").count(), 1)
How to do fuzzy query ?
I'm using watson 1.5.2 with Postgresql to look for contacts in an adress book via phone number. Now there's some odd behaviour. The numbers are stored as strings in the format "+12 3456 7890123" I'm getting results for queries on "3456 7890123" but none for "+12 3456 7890123", "12 3456 7890123" or when I use queries without white spaces. I'm using watson.filter(searchmodel, query) so nothing out of the ordinary. Is this a known issue? It isn't really a big deal for manual searches because most people don't search for the full number but I'm also getting requests to a REST API which is used by a programm connected to a TAPI.