Dan*_*oof 5 solr faceted-search
根据关于方面的Apache Solr文档,我可以使用键,因为:'当使用不同的排除项多次在同一个字段上进行分面时,这可能会有所帮助.
我需要它们,因为我希望有一个方面给我"最后一天","上周","上个月"选项.
但是,当我使用以下选项设置查询时:
http://URL/select?
...unrelated...
facet=true&
facet.date={!key=some_key}created&
f.some_key.facet.date.start=NOW/DAY-1DAY&
f.some_key.facet.date.end=NOW/DAY&
f.some_key.facet.date.gap=NOW/DAY+1DAY
...unrelated...
Run Code Online (Sandbox Code Playgroud)
Solr抱怨:
[exception] => org.apache.solr.common.SolrException:缺少必需参数:f.created.facet.date.start(或默认值:facet.date.start)
当我设置facet.date.start或f.created.facet.date.start时,它们将覆盖我的some_key(开始/结束/间隙)的字段,这是无用的,因为我需要多个键...任何人都可以点我在这方向的正确方向?由于我使用的库的限制,这需要在单个查询中完成.
Pas*_*imo 11
您可以使用构面查询:
http://URL/select?
...unrelated...
facet=true&
facet.query=[NOW-1DAY TO NOW]&
facet.query=[NOW-7DAY TO NOW]&
facet.query=[NOW-1MONTH TO NOW]&
...unrelated...
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4979 次 |
最近记录: |