你能对特定领域进行OR查询吗?例如,你能做(main_ref_number_tesim:(1920.1*)) OR (main_ref_number_tesim:(1920.2*))
吗?
我已经为我们的版本(5.5)阅读了documentation,他们使用没有特定字段的示例,例如:
"jakarta apache" jakarta
要么
"jakarta apache" OR jakarta
注意:我能够使用过滤器查询获得预期的结果,但我的目标是使用普通查询获得相同的结果。有效的fq是main_ref_number_tesim:(1920.1* 1920.2*)
。
EDIT1:我尝试过的常规查询,应该可以工作,但是不起作用,是:
(main_ref_number_tesim:(1920.1*)) OR (main_ref_number_tesim:(1920.2*))
main_ref_number_tesim:(1920.1* OR 1920.2*)
main_ref_number_tesim:(1920.1* 1920.2*)
是的,您可以为特定字段进行OR。
@Query(value = "*:*", filters = "(keywords:(?0))")
public Page<ENITITY> findDataByKeywords(List<String> keywords,Pageable pageable);
与上面的代码一样,当您传递关键字列表时,操作将由solr应用于关键字。
希望这能解决问题。