Skip to content

Add inFix, maxExtraPrefix and maxExtraSuffix search parameters#25

Closed
programVeins wants to merge 12 commits intomasterfrom
Nikodym7373/master
Closed

Add inFix, maxExtraPrefix and maxExtraSuffix search parameters#25
programVeins wants to merge 12 commits intomasterfrom
Nikodym7373/master

Conversation

@programVeins
Copy link
Copy Markdown
Contributor

Infix searching now works with the typesense-swift. Here's how to implement the same:

  1. Mark a field as infix: true in field defintion while creating the collection schema.
  2. Create search parameters with infix value to be either off, always or fallback. Use comma separated values to assign infix property to each of the query_by fields.
    Eg: SearchParameters(q: "abc", queryBy: "name,city,address", inFix: "off,always,off", maxExtraPrefix: 3) in this example, the infix assigned to each of the fields are -> name: off, city: always, address: off.
  3. Use maxExtraPrefix and maxExtraSuffix to fine tune the infix searching. If you want the query "DEF" to bring back the result "ABCDEF" then maxExtraPrefix should at least be 3. Suffix works similarly, but is used for characters after the query.

@ElDaRsh89
Copy link
Copy Markdown

Hi. So infix search is not available yet for swift?

@haydenhoang
Copy link
Copy Markdown
Contributor

Added in #30

@jasonbosco jasonbosco closed this Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants