Adapting Text Index
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Adapting Text Index
hi there,
I want to restrict text types in the aimeos search index.
works fine, when saving product texts. but the index is rewritten on index rebuild.
Applying
in the typoscript field of the scheduler task produces the following error.
array_merge(): Argument #2 must be of type array, null given
in ..../aimeos-core/src/MShop/Index/Manager/Text/Standard.php line 780
780: $map['content'] = array_merge( $map['content'], $texts['']['content'] );
what's wrong?
Aimeos Version
2022.10.8
Beside this, it would be helpful to have a configuration option to exclude variants of select products as well as rebate products from the index.
I want to restrict text types in the aimeos search index.
Code: Select all
module.tx_aimeos.settings.mshop.index.manager.text.types {
0 = short
1 = long
}
Applying
Code: Select all
mshop.index.manager.text.types {
0 = short
1 = long
}
array_merge(): Argument #2 must be of type array, null given
in ..../aimeos-core/src/MShop/Index/Manager/Text/Standard.php line 780
780: $map['content'] = array_merge( $map['content'], $texts['']['content'] );
what's wrong?
Aimeos Version
2022.10.8
Beside this, it would be helpful to have a configuration option to exclude variants of select products as well as rebate products from the index.
Re: Adapting Text Index
The problem is most likely caused because you exclude the product name and there are products without a short or long description. In later versions, the problem doesn't exist any more:
https://github.com/aimeos/aimeos-core/b ... #L755-L757
That would be helpful, Theoretically, products of type "voucher" can be excluded easily but variant articles are regular products.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Adapting Text Index
you're right. some products might not have all text types translated. anyway, inserting the lines of code from the current version doesn't change that behaviour. when executing the scheduler task I still get the described error.
beside this, the scheduler typoscript code
doesn't seem to have any effect.
all types of text are indexed.
beside this, the scheduler typoscript code
Code: Select all
mshop.index.manager.text.types {
0 = short
1 = long
}
all types of text are indexed.
Re: Adapting Text Index
We've fixed that here:
https://github.com/aimeos/aimeos-core/b ... d.php#L755
Seems to be OK. Can you check what is returned here?stiller wrote: ↑31 Oct 2024, 23:01 beside this, the scheduler typoscript codedoesn't seem to have any effect.Code: Select all
mshop.index.manager.text.types { 0 = short 1 = long }
all types of text are indexed.
https://github.com/aimeos/aimeos-core/b ... d.php#L677
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Adapting Text Index
thank you for reply and quick fix.
I figured out that one specific article without long description and one url for all languages has caused the error.
but with your fix it is failsafe
also I've to admit
mshop.index.manager.text.types {
0 = short
1 = long
}
does work. sorry. I was confused by a lot of text coming from variant products. it makes no sense to me to add all information from variants besides having these variant products in the index anyway. we've introduced an if clause to get rid of unwanted texts on the selection product level.
also I don't see a reason why the index does include disabled products. the related texts shouldn't show up in search results.
I figured out that one specific article without long description and one url for all languages has caused the error.
but with your fix it is failsafe
also I've to admit
mshop.index.manager.text.types {
0 = short
1 = long
}
does work. sorry. I was confused by a lot of text coming from variant products. it makes no sense to me to add all information from variants besides having these variant products in the index anyway. we've introduced an if clause to get rid of unwanted texts on the selection product level.
also I don't see a reason why the index does include disabled products. the related texts shouldn't show up in search results.
Re: Adapting Text Index
You are right, disabled products doesn't make much sense and products with a passed end date too. Both are not indexed any more now and the change will be in the next 24.10 LTS release.
What do you mean by "related texts"?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Adapting Text Index
that's good news. thank you.
related texts = text items of the disabled products
related texts = text items of the disabled products