CMS icon indicating copy to clipboard operation
CMS copied to clipboard

Lowered field in Mongo documents

Open aruss opened this issue 12 years ago • 3 comments

Hi, I trying to use mongo db provider now. And I think there is a possible bug. Why are there lowered fields for types other than strings?

kooboo_mongodb

And it is possible to turn this feature off for the whole content item or just for some fields.

I am adding half milion documents and need a case insensitive search only for one field.

cheers aruss

aruss avatar Aug 28 '13 08:08 aruss

I think you have noticed the lowered fields are used to achieve querying with case insensitive, it may duplicated the item size.

I think it is possible to add a setting for mongodb provider to identify if it need to query with case insensitive. But it some field need case sensitive, some field need need case insensitive will be more complicated.

kooboo-jifeng avatar Aug 28 '13 12:08 kooboo-jifeng

I got the need for that, but the problem is that it makes no sense to lower case types such boolean, datetime, int and so on.

You can search in mongo case insensitive, but then you have to use regular expressions and for that mongo will not use indexing. so its bad.

But it would be nice if kooboo had a option for a field where you can set if the field has to be indexed or not. Because not all fields need to be indexed.

cheers aruss

aruss avatar Aug 28 '13 13:08 aruss

OK, will think about it. I think we can try to add some more options on the content type column definition.

kooboo-jifeng avatar Aug 29 '13 17:08 kooboo-jifeng