|
@@ -440,11 +440,11 @@ public class EsPatentService {
|
|
|
String s = str.concat(patentNo).concat("*");
|
|
|
Query query = QueryBuilders.wildcard(i -> i.field("patent_no.keyword").value(s));
|
|
|
if (query1 != null && query2 == null) {
|
|
|
- bool = QueryBuilders.bool(i -> i.should(query1));
|
|
|
+ bool = QueryBuilders.bool(i -> i.should(query1).must(query));
|
|
|
} else if (query2 != null && query1 == null) {
|
|
|
- bool = QueryBuilders.bool(i -> i.should(query2));
|
|
|
+ bool = QueryBuilders.bool(i -> i.should(query2).must(query));
|
|
|
} else {
|
|
|
- bool = QueryBuilders.bool(i -> i.should(query1, query2));
|
|
|
+ bool = QueryBuilders.bool(i -> i.should(query1, query2).must(query));
|
|
|
}
|
|
|
} else {
|
|
|
if (query1 != null && query2 == null) {
|