solr: Create filter query with a function

落花浮王杯 提交于 2019-12-24 03:16:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!