Map<Integer, Double> queryVariables,
List<CategoryFilter> facetsFilter,
List<RangeFilter> variableRangeFilters,
List<RangeFilter> functionRangeFilters,
Map<String,String> extraParameters) throws IndexEngineApiException {
DocumentSearcher searcher = engine.getSearcher();
try {
Query query = generateQuery(queryStr, start, len,
QueryVariablesImpl.fromMap(queryVariables),
convertToMultimap(facetsFilter),
new IntersectionMatchFilter(
convertToVariableRangeFilter(variableRangeFilters),
convertToFunctionRangeFilter(functionRangeFilters)
)
);
SearchResults search = searcher.search(query, start, len, scoringFunctionIndex, extraParameters);
return search;
} catch (NoSuchQueryVariableException e) {
throw new IndexEngineApiException("Missing query variable with index '" + e.getMissingVariableIndex() + "'", e);
} catch (ParseException e) {
throw new IndexEngineApiException("Invalid query", e);