Up-weight or down-weight sections of a site in the search results
This article explains techniques that can be used to apply up-weighting or down-weighting to specific sites or sections of sites.
- Case 1: up-weight or down-weight a section of a website for all searches on a results page
- Case 2: up-weight or down-weight a section of a website based on which section is being searched
If you have a site search and different sections carry different levels of importance then you can tell Funnelback to apply an up-weight or down-weight to a page if it comes from a given section.
This applies to all queries against the index.
qie.cfg file that provides a base up-weight or down-weight for a given URL or set of URLs. The weighting column is a value between 0 and 1 with 0.0 providing maximum down-weight; 1.0 providing maximum up-weight and 0.5 is neutral. See the query independent evidence documentation for information on creating the
Rebuild the data source’s index to generate the qie index file. This can be done by running an advanced update to reindex the live view of the data source.
This will configure the weightings in the index.
The influence of query independent evidence on the ranking needs to be configured before any change is observed in the results. The influence of query independent evidence is controlled using the
cool.4 ranking option.
-cool.4 query processor option to set the overall influence given to query independent evidence in the index. The influence values range from 0.0 (no influence) to 1.0 (maximum influence) e.g.
cool.4=0.6 CGI parameter) to provide a slight influence from QIE.
In case 1 weightings were assigned to URLs globally for a site - so all searches on a site could up-weight certain documents.
However, if you wish to up-weight content for a certain section that’s being searched from within the section (e.g. providing a publications search that up-weights the publications pages but includes others, and a media releases search in another section of the site that up-weights media releases) then you can’t use the first method because the query independent evidence is now variable depending on what section you are searching from.
Achieving this variable up-weight is possible but more complicated.
gscopes.cfg and create a generalized scope for each section of the site where up-weighting will be required on that section.
E.g. Create scopes for pages under /publications/ and /media/ for the publications and media releases example above:
pubsScope mysite\.com\/publications\/ mediaScope mysite\.com\/media\/
Rebuild the data source’s index to apply the generalized scopes to the index. This can be done by running an advanced update to reindex the live view of the data source.
A results page needs to be created for each search that will require section up-weighting. See: managing profiles and services for information on how to create a results page.
Within the results page set a
query_processor_options within the results page configuration containing the following (can include other presentation and ranking settings too if required):
Note: weighting accepts a value within 0.0-1.0.
e.g. for the publications search
e.g. for the previous example tag each page with an appropriate section metadata field.
<meta name="section: publications"/> <meta name="section: media"/>
Update the data source - this will require a full update to ensure the new metadata is gathered as well as indexed.
This can be achieved in a number of ways such as including a hidden parameter in the search box, or setting the value in a hook script.
e.g. Deploy a search box that sets a hidden metadata constraint for the system query.
<input type="hidden" name="s" value="~fbSection:publications^0.8" />
Note: The tilde operator tells Funnelback to apply a custom weight indicated by the weighting following the carat.
The above example configures Funnelback to apply a moderate up-weight (0.8) to pages that have the section metadata class set to the value of publications.