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

Result not matched #277

Open
jatinbphp opened this issue Jan 18, 2023 · 6 comments
Open

Result not matched #277

jatinbphp opened this issue Jan 18, 2023 · 6 comments

Comments

@jatinbphp
Copy link

I have created index file with one of my database table.
Than I am searching with one sentence in that index.
But result is not giving exact matched with title or in body.
Below is my search code which I am using.
$tnt->selectIndex("body.index"); $res = $tnt->search($search, 5); $ids = $res['ids'];

Hear for example if i pass "How are you" in $search variable, it not give me result with exact matched title field in database.

I created index file of all fields of database table.

Please kindly help in this.

@stokic
Copy link
Contributor

stokic commented Jan 18, 2023 via email

@jatinbphp
Copy link
Author

Thanks for quick reply.
below is screenshot of my table which for which I created index.
localhost _ localhost _ sentinelone _ top_article_gpt _ phpMyAdmin 4 9 5deb2

For settings :
I first create index with below code.
$indexer = $tnt->createIndex('body.index'); $indexer->query('SELECT * FROM top_article_gpt');t $indexer->run();

Than I am searching in that index with below code.

$tnt->selectIndex("body.index"); $res = $tnt->search($search, 5);

Issue is I am not getting Ids of correct articles.
Suppose i search "Incorrect SentinelOne version number listed at registry", I am not getting that search result, while it should be first id as it exact match title field.
Hope it is more clear now.
Thanks in advance.

@stokic
Copy link
Contributor

stokic commented Jan 18, 2023 via email

@somegooser
Copy link

What happens when you search on "incorrect number listed" ? or "incorrect sentinel one". See the space between sentinel and one.

@jatinbphp
Copy link
Author

incorrect number listed

Not sure regarding which setting you are talking.

Below is my configuration.

$tnt->loadConfig([ 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'database', 'username' => 'username', 'password' => 'password', 'storage' => '/var/www/html/s1sp/storage', 'stemmer' => \TeamTNT\TNTSearch\Stemmer\PorterStemmer::class, //optional ]);

@jatinbphp
Copy link
Author

incorrect sentinel one

I searched, but it is not showing correct article.

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