GreenInfo-Network / WP_Query_WithRelevance

Wordpress WP_Query subclass which adds relevance sorting
MIT License
0 stars 0 forks source link

accept individual weights in $args #3

Closed gregallensworth closed 6 years ago

gregallensworth commented 6 years ago

The intent of DEFAULT_WEIGHTING_TAXONOMY_RATIO is to act as a default value, and that args would have a relevance_scoring structure would give details on the weightings per keyword, per taxo-term, etc.

gregallensworth commented 6 years ago

Done. Example:

            $filter['relevance_scoring'] = array(
                'tax_query' => array(
                    'policy_topics' => 15.0,
                ),
                'title_keyword' => 1.0,
                'content_keyword' => 0.25,
            );