You are here: Overviews > Search Requests > Search Features > Variable Term Weighting
Close
dtSearch Text Retrieval Engine Programmer's Reference
Variable Term Weighting

Variable term weighting allows the weight of each search to be specified in the search request.

When dtSearch sorts search results after a search, by default all words in a request count equally in counting hits. You can change this by specifying the relative weights for each term in your search request, like this:

apple:5 and pear:1

This request would retrieve the same documents as apple and pear but, dtSearch would weight apple five times as heavily as pear when sorting the results. 

Weights can also be applied to a field in a boolean seach, like this:

(description:5 contains (apple and pear)) or (author:2 contains ("John Smith"))
Automatic term weighting

In a natural language search, dtSearch automatically weights terms based on an analysis of their distribution in your documents. If you provide specific term weights in a natural language search, these weights will override the weights dtSearch would otherwise assign.

Copyright (c) 1995-2021 dtSearch Corp. All rights reserved.