Title: how weights calculated
Last modified: April 16, 2021

---

# how weights calculated

 *  [moh962008](https://wordpress.org/support/users/moh962008/)
 * (@moh962008)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/how-weights-calculated/)
 * Hello
 * i want to ask about weights calculation process and how i can see the affect 
   of the weights on the calculation process
 * as i have this problem
    i have talked to you before about the tags weights and
   you give me this code
 * add_filter( ‘relevanssi_match’, ‘rlv_product_tag_boost’ );
    function rlv_product_tag_boost(
   $match ) { if ( $match->taxonomy > 0 ) { $match->weight = $match->weight * 5 *
   $match->taxonomy; } return $match; }
 * but its not working very well for all the tags or all the search process i mean
   if you try to to enter my website and search for (( رام 8 جيجا ))
    the finical
   calculation weight is strange because i have insert the same sentence (( رام 
   8 جيجا )) to a specific product to post it how ever its not posted ! and its 
   still not on the first
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhow-weights-calculated%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/how-weights-calculated/#post-14329830)
 * You can see how the weights work if you search with the Relevanssi admin search(
   Dashboard > Admin search). It will show you the exact weights Relevanssi calculates.
 * 5 is a really small multiplier, so that’s one thing. Also, this boost is applied
   to all individual words, so when you search for “8 giga ram”, this boost is applied
   to all tags that have “giga” or “ram” in it. By default Relevanssi skips short
   words, so the “8” is discarded right away. So, all products with tags like “16
   giga ram” or “32 giga ram” will also get the same bonus. Since those are fairly
   common words on your site, this is going to be a hard thing to get right.
 * Using phrase matching, ie. putting the search term in quotes, does help a lot.
 *  Thread Starter [moh962008](https://wordpress.org/support/users/moh962008/)
 * (@moh962008)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/how-weights-calculated/#post-14330356)
 * is there a solution to boast the full word ?
    i mean if some one write ” 8 giga
   ram ” then any tag with “giga ram ” will boosted more than any post that have
   only ” ram ”
 * my second question how i can let the relevanssi not skipping the short words ?
 *  Plugin Author [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * (@msaari)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/how-weights-calculated/#post-14332266)
 * [Here are instructions for boosting exact matches](https://www.relevanssi.com/knowledge-base/adding-extra-boost-exact-title-matches/).
   There’s no example for boosting a partial taxonomy match, but if you give these
   instructions to a developer, the rest should be easy for them.
 * The minimum word length is adjusted in the indexing settings. If you want to 
   adjust it to 1, you also need [this filter hook](https://www.relevanssi.com/user-manual/filter-hooks/relevanssi_block_one_letter_searches/).

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘how weights calculated’ is closed to new replies.

 * ![](https://ps.w.org/relevanssi/assets/icon-256x256.png?rev=3529670)
 * [Relevanssi - A Better Search](https://wordpress.org/plugins/relevanssi/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/relevanssi/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/relevanssi/)
 * [Active Topics](https://wordpress.org/support/plugin/relevanssi/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/relevanssi/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/relevanssi/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Mikko Saari](https://wordpress.org/support/users/msaari/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/how-weights-calculated/#post-14332266)
 * Status: not resolved