Skip to content

Can we disable fuzziness ? #1268

Answered by joemcelroy
thedevvikas asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there,

You cant disable fuzziness but you can override the default query thats used via getQuery. This is what the default query function does.

In the future, I would like to expose it so that you can do the following:

import { RelevanceMatch } from "searchkit"
import Client from "@searchkit/api";
 
const client = Client({ ... })

export default async function handler(
  req: NextApiRequest,
  res: NextApiResponse
) {

  const results = await client.handleRequest(req.body, {
    getQuery: RelevanceMatch({ fuzziness: false })
  });

  res.send(results);

}

happy to accept PRs for this change too!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joemcelroy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants