What are scoring functions and document variables?
IndexTank uses scoring functions to customize the order of search results. Scoring functions are mathematical formulas that we apply to every document on search time to calculate a value (score) for it. We then use this value to sort the results. The scoring functions can refer to the document’s age, its relevance to the query and special variables that you can supply for a document, such as number of votes, or any numeric value that you can associate with your document and that somehow describes the importance of that document. IndexTank is optimized to allow very frequent updates to document variables without slowing down the index. You can define several scoring functions and choose which one to use for each query. When you change a scoring function, the new version immediately takes effect. Scoring functions are different from typical database sort clauses in that they allow much greater flexibility. See our Scoring Functions documentation page for more information.