Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String undefined being attach to collection name. #100

Open
danielcamargo opened this issue Jan 12, 2022 · 6 comments
Open

String undefined being attach to collection name. #100

danielcamargo opened this issue Jan 12, 2022 · 6 comments

Comments

@danielcamargo
Copy link

Description

I am working on a Sveltekit product. On production only, the API call attaches a string undefined as part of the query.

image

this is the code:

const result = await client.collections('cards').documents().search({
      q: term,
      prefix: true,
      num_typos: '1',
      query_by: 'firstName,lastName',
      per_page: 10,
      sort_by: 'sort1:asc,sort2:asc',
      page: currentPage,
    });

Version: "typesense": "^1.1.3-0"

@jasonbosco
Copy link
Member

jasonbosco commented Jan 13, 2022

Hmmm. @francoislg I wonder if this is somehow related to #97. But you said 1.1.3-0 worked in production with Sveltekit for you right?

@francoislg
Copy link
Contributor

francoislg commented Jan 13, 2022

It is the same issue that we got, and we are running 1.1.3-0 in production 🤔

Our code is 95% the same as the code here, so I'm think it might be the client type?

We are using SearchClient, which uses SearchOnlyDocuments instead of Documents. Maybe my fix broke Documents when fixing SearchOnlyDocuments?

So

1- Do you have the same issue if you use a SearchClient instead (if you are currently using Client)?
2- Do you have the same issue with 1.1.2?

@danielcamargo
Copy link
Author

@francoislg it worked with SearchClient. Thanks for your help!

@francoislg
Copy link
Contributor

This means I probably broke the original Client 🤕

@jasonbosco
Copy link
Member

I wonder if the same fix you did for SearchClient needs to also be done for Client, to get it to work with SvelteKit?

@francoislg
Copy link
Contributor

I got super sidetracked but came back on this, is this still an issue ? 😓

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

No branches or pull requests

3 participants