-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Full Text Search #40
Comments
I'd love to have a more fleshed out search. Right now, it is restricted to only posts and tags. There is much room for improvement! So yes, if you'd like to tackle this feature and send me a PR, I'd be more than happy to include it in the project. Let me know if you have any questions or need anything. |
Ok great! The dependencies of TNTSearch are
So if we include it, canvas will also depend on it, are you ok with this? |
Yes that's fine. |
I guess we can close this one now. If someone experiences a bug with the search, feel free to assign the issue to me. |
@nticaric Is this something that would be addressed in the config or |
Also can't seem to pull any results from a search at all. |
It seems like the folder where the database resides doesn't have write permissions. Can you please check if the folder and the index itself is writable. The default folder where the index resides is If the script failed to write to those indexes the search results will be empty |
Yup I'll do that right away. FYI I just created a revert pull request, because I was hasty and just pulled everything in without testing myself. So I'm just reverting for a tiny bit while I do as much testing as I can and then I'll just have you send me a pull request again. Sorry for the confusion, I just should have been more thorough with my processes. But everything looks GREAT so far, and I'll gladly pull this in as soon as I run through it :) |
Ok, no problem. I think that the problem here were only the permissions. We have several options for this:
|
Thanks for the explanation, it really helps. I think I like the 3rd option, since in a testing environment we are just looking for application functionality, and there won't really be a need to search for anything. So I think we'd be safe going that route. As far as the permissions, is there anything we need to add to the Last, we'd need to update the .env.example with a DB_CONNECTION variable right? |
I think you're already telling users to make the storage directory writable in the readme file. Maybe it's better to change the tntsearch config file and default it to mysql |
Ok. Let's leave the current storage directory permissions statement in the |
Yes, I allready did that. Try to clone my fork and test it, and if everything goes smoothly, I'll send you a pull request, if not, we'll try to fix it ;) |
Will do! I'll give it a go tonight. Thanks for working on this with me! |
Hey @austintoddj, did you had any chance to look into this? |
Have not yet, my apologies. Hoping to tonight however. Should see the merge soon! :) |
Ok so I'm still getting the error Attempting to write a readonly database. Any thoughts @nticaric? Post index and tag index both have contents. |
This must be due to your write permissions, the index file needs to be writable. Can you try to manually set it to ie. 777 |
@nticaric Ok awesome, think I've got it all working. You were right. Even though the storage folder is modified during the setup, the addition of the files at a later time means they aren't 777 like the directory was set. So it just means modifying the permissions again. Just making a couple more tests. |
One other thing, looks like when I run the migrations and seed the database now, I get 2 duplicate tags attached to the 1 post. Have you run into this? |
Hmm, this doesn't happen to me. Is it possible that you're running the seeder 2 times? |
Ah it's actually when I run |
Each time the command |
Ah good catch! Do you want to add the truncate to your PR? Also, just trying to think of all the possibilities for error people could run into installing this. Is there anything in the setup process or steps that you can think of need to be addressed before we pull this in? If not, I think we're ready to go if you just send me a PR again. |
Right now the only thing that I can think of are those permissions, everything else should be ok. |
Ok great. As soon as those tests are run, I'll merge it in. I'll re-arrange some steps in the |
Nice work on this @nticaric. Love the feature, works great. Referenced TNTSearch in the |
Every time I create or update a post it takes long time and it show FatalErrorException in TNTIndexer.php line 291 - Maximum execution time of 30 seconds exceeded. |
Does the post contain some binary data, or base64 encoded, like inline images? |
Just the sample Hello World post |
@vhanla can you check the post content to see how it looks in the database? |
@nticaric Thanks for jumping in on this right away! |
@nticaric I just reinstalled a new empty project with Maybe it has to do with my current computer setup: Finally I changed PHPs script execution time to 130 seconds and it worked, but I had to wait almost those 130 seconds. I suppose it takes its time to do its job. Hopefully in my real server it will not take that long to post/update a post, since - locally - I'm using a "not really fast laptop" neither a Unix/Linux OS. Anyway, thank you very much for your concern. |
@vhanla Glad you got it working. And just for a comparison, when I run the same routine on a very basic production server, it only takes about 1-1.5 seconds to complete. |
@austintoddj have you considered adding full text search support? If you are interested, I can create a pull request by implementing TNTSearch
The text was updated successfully, but these errors were encountered: