First, I do not recommend using Relevanssi with 1.5 million products. You probably need something more robust for that, a cloud service like Algolia. But I understand Relevanssi is free, and Algolia is hundreds of dollars per month at your numbers.
Yes, you can only index the product title. You can disable everything else from Relevanssi settings, but to stop Relevanssi from indexing the post content, you need to add this:
add_filter( 'relevanssi_index_content', '__return_false' );
Thanks for your time to reply!
Does the “product” field index only the product name ?
If not, how to index only the product name ?
This is the location for product field what I’m talking about
Indeksointiasetukset -> Artikkelilajit -> product (I have finnish version)
do I just drop this add_filter code to functions.php right ?
Yes, the code goes to the theme functions.php.
The product name is in the post title. If you choose nothing from Relevanssi settings, Relevanssi indexes the post title and content. Wth this function, you’ll disable post content, leaving you with the title.
Oh wow, thank you very much for the info! π I’ll try and keep in mind the pro version to grab at somepoint if I get this project somehow work π