Comments (14)
Have you run the indexer again or did you just move the index files over?
What are the file permissions of your storage folder?
from tntsearch.
The storage permission is drwxrwxr-x
The database file permission is -rw-r--r--.
from tntsearch.
And yes I re-run the indexer From a fresh Laravel install just so I could be sure.
from tntsearch.
It's hard to say what could be wrong here. I think your only option is to trace the function calls to see
where it went wrong. Try with a word that you are sure is in the index, and keep in mind that the index contains stemmed words not the real ones. So if you for example search for the word yes
you'll find it in the wordlist as ye
from tntsearch.
I don't think that's the problem. Maybe it has to do with the sqlite driver
or something. Will try to reinstall it and see what happens.
On Jul 9, 2016 4:09 PM, "Nenad Ticaric" [email protected] wrote:
It's hard to say what could be wrong here. I think your only option is to
trace the function calls to see
where it went wrong. Try with a word that you are sure is in the index,
and keep in mind that the index contains stemmed words not the real ones.
So if you for example search for the word yes you'll find it in the
wordlist as ye—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#23 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHrcKCcVp_wpNGXf7evbLp-EZEgWYdwgks5qUAAHgaJpZM4JIeC1
.
from tntsearch.
Have you managed to solve your issue? Here's what you can try:
in your laravel root go to vendor/teamtnt/tntsearch
, run composer update
and then simply run phpunit
.
If all of the tests pass, the package works fine, if not, you'll get an error message telling you what and why it failed
from tntsearch.
- TNTSearchTest::testSearchBoolean
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 0 => 7
)
On PHP 7.0.8 with sqlite3 - No result id in ids array
from tntsearch.
I tracked this down to
public function getWordlistByKeyword($keyword, $isLastWord = false)
What is VERY bizarre is loading sqlite3 Running this:
SELECT * FROM wordlist WHERE term LIKE 'phone'; <-- Fail
SELECT * FROM wordlist WHERE cast(term as text) LIKE 'phone'; <-- I get results
Tweaking the code in this method to the following makes the indexer work. I am inclined to believe there is some bug in the client library. Or there is something really weird happening with column affinity. https://www.sqlite.org/datatype3.html
$searchWordlist = "SELECT * FROM wordlist WHERE cast(term as text) like :keyword LIMIT 1";
$stmtWord = $this->index->prepare($searchWordlist);
if ($this->asYouType && $isLastWord) {
$searchWordlist = "SELECT * FROM wordlist WHERE cast(term as text) like :keyword ORDER BY length(term) ASC, num_hits DESC LIMIT 1";
$stmtWord = $this->index->prepare($searchWordlist);
$stmtWord->bindValue(':keyword', mb_strtolower($keyword) . "%");
} else {
$stmtWord->bindValue(':keyword', mb_strtolower($keyword));
}
from tntsearch.
@mphill good catch. I also think there is something wrong with the sqlite3 verison 3.11.0.
The column datatype is recognized as BLOB
instead of TEXT
. I asked a question on stackoverflow to see whats going on
from tntsearch.
Hopefully this ubuntu 16.04 bug is now fixed with the v0.7.1 release. Can you guys test and confirm?
from tntsearch.
That did not appear to fix it. Let me dig into your commit change log
from tntsearch.
@mphill does phpunit still fail for you?
from tntsearch.
Its working.
You have to regenerate existing the indexes.
All unit tests passed.
from tntsearch.
Great! Yeah, the existing index files need to be regenerated
from tntsearch.
Related Issues (20)
- Undefined index: docScores HOT 2
- Does it possible to reate index by array of data? HOT 4
- Dynamic properties used in "TeamTNT\TNTSearch\Indexer" HOT 3
- Depreciation : Using ${var} in strings is deprecated, use {$var} instead in PHP 8.2 HOT 1
- tntsearch Deprecated: Creation of dynamic property HOT 1
- Anyone know what this random SMS-Texts file is? HOT 2
- Diacritic-Insensitive Search Support (Czech characters) HOT 3
- Scout: Custom tokenizer indexing properly to allow dashes and periods, but searching on dashes does not work HOT 9
- Performance issues with large datasets HOT 6
- Class 'TeamTNT\TNTSearch\Engines\Exception' not found in 'vendor/teamtnt/tntsearch/src/Engines/EngineTrait.php' line 46 HOT 1
- Per-Model Fuzzy Search Configuration in Laravel Scout HOT 1
- [FEATURE] Support of PSR-16 adapter
- How to add MYSQL_ATTR_SSL_CA option? HOT 1
- $startpos adjustment may return minus value. HOT 1
- How to update index for which no index.
- Fuzziness / Fuzzy-Search not working HOT 3
- Scout Driver - Model update or save dont trigger tntsearch index update HOT 3
- new TNTGeoIndexer expects engine
- Why add 'return' in saveHitList function? HOT 3
- Inaccurate results when searching two or more keywords. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tntsearch.