#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
13mo
Solved
Join the chat
Oct 26, 2022 (14 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 (14 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 (14 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 (13 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.

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3011 threads (79% resolved)

Join Our Community

Similar Threads

Issue with `included_fields` Command in Typesense

SamHendley encountered an issue with the `included_fields` command in Typesense versions 0.23.0 and 0.24.0.rc17. Jason helped identify it as a bug in the 0.24.X version, which was later addressed in release 0.24.0.rcn19.

16
14mo
Solved

Phrase Search Relevancy and Weights Fix

Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.

6

111
8mo
Solved

Resolving Multilingual Search Function in Typesense Software

Bill is having difficulty with multilingual search functionality in Typesense software. Developer Kishore Nallan suggested setting a language locale and provided a demo build. The build solution had some issues, and after multiple rounds of software updates and troubleshooting, the problem still persists.

2

89
25mo

Array Field Autocomplete Issue in Typesense Migration

Kanwei encountered issues with autocomplete when migrating from Elasticsearch to Typesense. Jason and Kishore Nallan identified it as a bug and instructed Kanwei to create a GitHub issue.

1

20
9mo

Troubleshooting Issues with DocSearch Hits and Scraper Configuration

Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.

7

131
8mo
Solved