You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of a bug in Laravel Scout (laravel/scout#331) I was sometimes seeing model creation times of 8-10 seconds. My models are not searchable when they are first created (they are just pending) but since Scout doesn't know they aren't in the index yet, it has to look for them and then delete them. (Though, if it finds 0 documents - it doesn't really need to do the delete query at all -- but that's a separate bug.)
I have a pretty large index (380M) and these searches were taking unacceptably long. I manually added and index to the doc_id column and that made the app speedy again. However, I don't know all the ramifications of this. Is there a specific reason that the index is not created by default? I do notice that my database file grew from 380M to 510M. Perhaps this is the only reason it's not included by default? But, in my case, the application was borderline unusable without it.
The text was updated successfully, but these errors were encountered:
I think you're right, there should be an index. Cannot think of any other reason than file size and speed of index creation. But since storage is cheap, it's better to have performance then small size.
Would you be so kind and create a pull request for this?
Hello -
Because of a bug in Laravel Scout (laravel/scout#331) I was sometimes seeing model creation times of 8-10 seconds. My models are not searchable when they are first created (they are just pending) but since Scout doesn't know they aren't in the index yet, it has to look for them and then delete them. (Though, if it finds 0 documents - it doesn't really need to do the delete query at all -- but that's a separate bug.)
I have a pretty large index (380M) and these searches were taking unacceptably long. I manually added and index to the doc_id column and that made the app speedy again. However, I don't know all the ramifications of this. Is there a specific reason that the index is not created by default? I do notice that my database file grew from 380M to 510M. Perhaps this is the only reason it's not included by default? But, in my case, the application was borderline unusable without it.
The text was updated successfully, but these errors were encountered: