Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

what about a text column type to store json objects that will contains all the error log data, this is the approach used by wordpress for its custom fields feature

search functionality can be implementing by creating an full text index, more here: http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html

Last updated 2 years ago.
0

I feel that you shouldn't search a JSON encoded text field, Especially like user ids etc you would have to match on "user_id":4 it would just be a nightmare.

Last updated 2 years ago.
0

mysql has regexp support, so you can build very complex searches

second, you don't must rely in only one field, in this case the json field, before inserting the json data, you previously must to analyze it to extract the unique data, like user_id, timestamp, etc

Last updated 2 years ago.
0

So I would analyze it for?

I was considering making a meta table with 2 columns, keys (string [dot notation for arrays]) and then value, would this not be more effective?

Last updated 2 years ago.
0

first of all, have you some sample/idea that how will looks the meta data to be manipulated??

Last updated 2 years ago.
0

Well meta is going to be user defined so I am guessing they could have anything from:

user: { name: 'N/A', id: 9 }

to: error: { serverId: 'N/A', hostname: '' }

So there is no rules on meta data totally up to what is sent to me in the request.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

bweston92 bweston92 Joined 3 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.