We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is it possible to order the results by relevance?
Single word searches are okay, (ie searching for "balance", brings up any thing with "balance")
But when you start using 2 or more words (ie "balance naturals"), I'm getting results with either "balance", "naturals" and "balance naturals".
The code I am using is below;
$tnt->selectIndex( "products.index" ); $tnt->asYouType = true; $res = $tnt->search( $_GET['query'], 120 ); $res = implode( ',', $res['ids'] );
The text was updated successfully, but these errors were encountered:
The whole point of the full-text search is that the results are already ranked by relevance. Otherwise, it wouldn't make much sense, would it? :)
What you need is Boolean search https://github.com/teamtnt/tntsearch#boolean-search
Sorry, something went wrong.
And if I want to change relevance, add new criteria. Example: Order also by date.
Is it possible?
@renanvalente TNTSearch returns a list of ids containing your search query. What you can do is to add an oder criterion in your query. ie date
SELECT * FROM articles WHERE id IN $res ORDER BY date;
No branches or pull requests
Is it possible to order the results by relevance?
Single word searches are okay, (ie searching for "balance", brings up any thing with "balance")
But when you start using 2 or more words (ie "balance naturals"), I'm getting results with either "balance", "naturals" and "balance naturals".
The code I am using is below;
The text was updated successfully, but these errors were encountered: