The Query EP allows developers to change the weights of the query according to certain fields and it allows for the complete re-writing of the query.
- Implement Sando.ExtensionContracts.QueryContracts.IQueryRewriter.RewriteQuery
- Implement Sando.ExtensionContracts.QueryContracts.IQueryWeightsSupplier.GetQueryWeightsValues
- Add query rewriter to Sando's configuration file (link to come)
string RewriteQuery(string query) - Rewrite the query according to any scheme
Dictionary<string, float> GetQueryWeightsValues - Provide mapping between field name and query weight
- Does not re-write the query
- Weighs the "name" field a '4' and all other fields a '1'
For details see:
A user could implement this extension to rewrite the query by adding synonyms or to increase the weight of method bodies (i.e., the 'body' field) to equal the 'name' field.