#community-help

Phrase Match Problem in Typesense Version 0.24.0rcn25

TLDR Robert was unsure about correct phrase match usage in Typesense. After providing Kishore Nallan with necessary data, Kishore Nallan was able to replicate the issue. Robert shared a Github link for further tracking, where Kishore Nallan responded later.

Powered by Struct AI
9
11mo
Solved
Join the chat
Oct 26, 2022 (12 months ago)
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
06:15 PM
Heya. Running 0.24.0rcn25 and I'm not sure I'm doing "phrase match" correctly. Download phraseMatchFiles.zip then extract it, create data dir, run server, create schema and import doc:
06:16
Robert
06:16 PM
mkdir data
typesense-server --data-dir=./data --api-address=127.0.0.1 --api-port=8108 --peering-address=127.0.0.1 --api-key=TESTCASEKEY
curl "" -X POST -H "Content-Type: application/json" -H "X-TYPESENSE-API-KEY: TESTCASEKEY" -d '{"name" : "twig", "fields" : [{ "name" : "content", "type" : "string", "optional" : true }] }'
curl "" -X POST -H "X-TYPESENSE-API-KEY: TESTCASEKEY" --data-binary @"singledoc.jsonl"

Then perform search:
curl --silent "" -X POST -H "Content-Type: application/json" -H "X-TYPESENSE-API-KEY: TESTCASEKEY" --data-binary @"searchTest.json"

It returns 1 hit, but I was expecting ZERO hits, because in the content the words "frontier mail" do not appear together. I see that according to highlight.meta.content.matched_tokens it only matched on "mail".

Am I not correctly doing phrase match properly? Is there an additional setting or flag I need to set?
Oct 27, 2022 (12 months ago)
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
04:39 AM
I get a 404 for that zip file Robert
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
11:50 AM
Whoops. Fixed the 404. It's downloadable now
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:13 PM
Okay, let me look into what's happening.
03:07
Kishore Nallan
03:07 PM
Able to reproduce, I will investigate and update this thread.
Oct 28, 2022 (12 months ago)
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
01:44 AM
Cool beans. Let me know if you'd like me to submit this in a github issue instead. I wasn't sure if it was a bug or if I was doing something incorrectly.
Nov 08, 2022 (11 months ago)
Robert
Photo of md5-6384d24e1825271b2c37ad8afa24a899
Robert
01:55 PM
I decided to submit this as a github issue: https://github.com/typesense/typesense/issues/779
Just so it's easier to track going forward as slack isn't super ideal for longer term type issue tracking.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
02:13 PM
Thanks, I've responded on the issue with details on what is happening here.