Can fuzzy search work across multiple tables?

Options

Is it possible to setup a fuzzy search that can search multiple tables? I've currently got an API endpoint setup that performs a "Query All Records" on my /producdb table and joins in another table with product specs.



The fuzzy search implimented currently works, but only on the productdb table. If a user tries to search for specs of a product they don't get results because that data is on the joined table.



How can I allow the user to search both tables at once?

Answers

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options

    Hey, Brandon. I can't say I've tried this specifically, but what might work is instead of using an addon, use an eval (or collection of evals) to return the fields from the joined table and then include those in your query.

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    I'd seriously consider making a table specifically for handling the fuzzy search requirements. Shove all the text about a given product (from both tables!) in there along with a reference to the products table so that finding something lets you retrieve the IDs.

    Then you have a second query to pull the records for those IDs.

    Search is a weird fit for a relational database. It doesn't profit from the multidimensionality of it. So building a separate resource can be a way out.