You have a subforum with cats;
your cats have an age, a weight, a size, and some more integer values to know, filter and search.
I want to see all cats two till three years old with a weight between x and y kilo and a size of max z.
We can buy the monster add-on of addonslab.
We dont use an add-on that adds all values in an array and starts searching there (if it still exists)
We can try the add-on from ozz
or we can add our fields to xf_table; many fields, i dont like it.
Though we could add some fields with 0/1 to a byte_field to save fields
And we can do this new idea, i had a minute ago:
we extend the field_value_tables with a field integer_value and let xf know that it is used.
here we add an index now.
and now we could search in the custom_fields that are integers like
field_name=birth, find int_value > 18 and < 88
field_name=kilogramm, find int_value > 2 and < 4
Maybe we add a second field for enums and short text like "red, blue, grey"
Would this help to have better search and filter on custom-fields with such a relation, when the fields we use have an index?
your cats have an age, a weight, a size, and some more integer values to know, filter and search.
I want to see all cats two till three years old with a weight between x and y kilo and a size of max z.
We can buy the monster add-on of addonslab.
We dont use an add-on that adds all values in an array and starts searching there (if it still exists)
We can try the add-on from ozz
or we can add our fields to xf_table; many fields, i dont like it.
Though we could add some fields with 0/1 to a byte_field to save fields
And we can do this new idea, i had a minute ago:
we extend the field_value_tables with a field integer_value and let xf know that it is used.
here we add an index now.
and now we could search in the custom_fields that are integers like
field_name=birth, find int_value > 18 and < 88
field_name=kilogramm, find int_value > 2 and < 4
Maybe we add a second field for enums and short text like "red, blue, grey"
Would this help to have better search and filter on custom-fields with such a relation, when the fields we use have an index?
PHP:
$structure->relations += [
'FieldValue' => [
'entity' => 'XF:ThreadFieldValue',
'type' => self::TO_ONE,
'conditions' => 'thread_id',
],
];