Code Monkey home page Code Monkey logo

Comments (14)

nticaric avatar nticaric commented on May 22, 2024

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.

jgb-solutions avatar jgb-solutions commented on May 22, 2024

The storage permission is drwxrwxr-x
The database file permission is -rw-r--r--.

from tntsearch.

jgb-solutions avatar jgb-solutions commented on May 22, 2024

And yes I re-run the indexer From a fresh Laravel install just so I could be sure.

from tntsearch.

nticaric avatar nticaric commented on May 22, 2024

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.

jgb-solutions avatar jgb-solutions commented on May 22, 2024

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.

nticaric avatar nticaric commented on May 22, 2024

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.

mphill avatar mphill commented on May 22, 2024
  1. 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.

mphill avatar mphill commented on May 22, 2024

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.

nticaric avatar nticaric commented on May 22, 2024

@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

http://stackoverflow.com/questions/38489509/sqlite3-where-clause-doesnt-return-anything-if-datatype-is-blob

from tntsearch.

nticaric avatar nticaric commented on May 22, 2024

Hopefully this ubuntu 16.04 bug is now fixed with the v0.7.1 release. Can you guys test and confirm?

from tntsearch.

mphill avatar mphill commented on May 22, 2024

That did not appear to fix it. Let me dig into your commit change log

from tntsearch.

nticaric avatar nticaric commented on May 22, 2024

@mphill does phpunit still fail for you?

from tntsearch.

mphill avatar mphill commented on May 22, 2024

Its working.

You have to regenerate existing the indexes.

All unit tests passed.

from tntsearch.

nticaric avatar nticaric commented on May 22, 2024

Great! Yeah, the existing index files need to be regenerated

from tntsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.