Last Reviewed: August 21, 2014
Applies to: dtSearch Engine 7
The dtSearch Engine API has several ways to promote certain documents to the top of search results lists:
(1) Unconditionally promoting documents
If the promoted documents should always appear ahead of all other documents, you can put them in a separate index and search this index first, report documents from this index, and then search other lower-priority indexes.
(2) Promotion by keyword
If the promoted documents should appear ahead of other documents only based on certain keywords, you can add these keywords to a field in the promoted documents and use field weighting to weight hits in this field very highly. For information on adding metadata to documents during indexing, see Adding fields to documents.
(3) Promotion by document weighting
If the promoted documents should be given additional weight but should not necessarily go ahead of all other documents, you can add a keyword to a field in the documents and then add this keyword as a search criterion to all searches, with a higher weight given to hits in the field. Use the andany connector to add this term to a request without affecting document selection. For example, you could name the field "promotefield" and put a keyword xpromote in the field when you index the documents. Then in a search you could use term weighting to add weight to the promoted term, like this:
(user request) andany (promotefield contains xpromote:100)