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

this has nothing to do with PHP and MYSQL, right? #283

Open
halukkaramete opened this issue Nov 9, 2024 · 1 comment
Open

this has nothing to do with PHP and MYSQL, right? #283

halukkaramete opened this issue Nov 9, 2024 · 1 comment

Comments

@halukkaramete
Copy link

Hello, as I understand, your wonderful search utility works with a JSON record, downloaded to the client and the entire operation is done withing the browser, correct?

That means no live look up mySQL's queries to bring results as the user types ahead...

is it also possible to get the json formed on the fly, for example, take the 3 letters user has entered and trigger a buildJSON call at the 3rd character, submit to your SQL for a query like bring everything you got that matches those 3 letters in the kind of a JSON your engine wants and then leave the rest of the action be taken care of by your engine.

This way, even if you were to have a 2, 3 hundred thousand record DB, having those 3 characters would significantly reduce the JSON to be dealt with...

Am I sensing your tool correctly?

@lucaong
Copy link
Owner

lucaong commented Nov 11, 2024

Hi @halukkaramete ,
you are right, MiniSearch by itself has no knowledge of PHP or databases. It normally runs in the browser, although it can run on the server side on NodeJS.

It is possible to submit the query to the server for an initial check on the database of the matching records, but that would mean that the candidate records have to be re-indexed upon each query. If the full collection of documents does not fit in the browser, it might be worth using a search server like ElasticSearch.

I hope this helps :)

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

2 participants