Hi. Just a quick question. I have been working wit...
# orm-help
v
Hi. Just a quick question. I have been working with fullTextSearch with prisma and postgres and things were working well till I noticed this case. This is the string I am searching for from the table: "Select the SOAP header that does not exist in API 29.0 and earlier versions up to 14.0 and might not be seen in WSDL" This is the search term I am using: "API+29.0" And it does not return any record. But 29.0 returns and API returns. For some reason alpha numeric search does not seem to work in
fullTextSearch
Any idea why?
n
Hey Vignesh 👋 Thank you for reporting this, I am able to replicate it and there seems to be an issue while searching with alpha numeric query. Could you please open a Bug report for this.
👍 1
v
@Nurul Sure. Will do
j
Wasn't there something about having to split multiple words apart in the search? Or was that changed?
n
Copy code
await prisma.post.create({
    data: {
      title: 'Hello World',
      content:
        'Select the SOAP header that does not exist in API 29.0 and earlier versions up to 14.0 and might not be seen in WSDL',
    },
  });

  // All drafts that contain the words
  const result = await prisma.post.findMany({
    where: {
      content: {
        search: 'API 29.0',
      },
    },
  });

  console.log(result);
Searching for
API 29.0
gives the following error
Copy code
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Error { kind: Db, cause: Some(DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState("42601"), message: "syntax error in tsquery: \"API 29.0\"", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("tsquery.c"), line: Some(726), routine: Some("makepol") }) }) })
While searching for
API & 29.0
by using
&
operator is giving proper results.
h
@Nurul
j
Ok that error is definitely worth a bug issue though, that is ugly 😄