问题
One of the values returned by my solr query is a calculated value (using solr 4.0). The function is
sum(product(2,preis12_0_3),preis34_0_3)
Now I would like to filter the resultset on the values returned by the function, but I get this error:
undefined field text
Is it possible to filter on a function? Any pointers in the right direction appreciated.
回答1:
Filter query do support function queries with FunctionRangeQParserPlugin
e.g. Filter query example: fq={!frange l=0 u=2.2}sum(user_ranking,editor_ranking)
undefined field text -> Would be the case for the field not being defined in the schema.xml
来源:https://stackoverflow.com/questions/16708252/solr-create-filter-query-with-a-function