@@ -47,7 +47,7 @@ public static void main(String[] args) throws ParseException, org.apache.commons
47
47
ctx .result ("{}" );
48
48
49
49
var q = new GrebiSolrQuery ();
50
- q .addFilter ("grebi__nodeId " , List .of (ctx .pathParam ("nodeId" )), SearchType .WHOLE_FIELD );
50
+ q .addFilter ("grebi:nodeId " , List .of (ctx .pathParam ("nodeId" )), SearchType .WHOLE_FIELD , false );
51
51
52
52
var res = solr .getFirstNode (q );
53
53
@@ -71,12 +71,15 @@ public static void main(String[] args) throws ParseException, org.apache.commons
71
71
q .setSearchText (ctx .queryParam ("q" ));
72
72
q .setExactMatch (false );
73
73
q .addSearchField ("id" , 1000 , SearchType .WHOLE_FIELD );
74
- q .addSearchField ("grebi__synonym" , 900 , SearchType .WHOLE_FIELD );
74
+ q .addSearchField ("grebi:name" , 900 , SearchType .WHOLE_FIELD );
75
+ q .addSearchField ("grebi:synonym" , 800 , SearchType .WHOLE_FIELD );
75
76
q .addSearchField ("id" , 500 , SearchType .CASE_INSENSITIVE_TOKENS );
76
- q .addSearchField ("grebi__synonym" , 450 , SearchType .CASE_INSENSITIVE_TOKENS );
77
- q .addSearchField ("grebi__description" , 400 , SearchType .WHOLE_FIELD );
78
- q .addSearchField ("grebi__description" , 250 , SearchType .CASE_INSENSITIVE_TOKENS );
77
+ q .addSearchField ("grebi:name" , 450 , SearchType .CASE_INSENSITIVE_TOKENS );
78
+ q .addSearchField ("grebi:synonym" , 420 , SearchType .CASE_INSENSITIVE_TOKENS );
79
+ q .addSearchField ("grebi:description" , 400 , SearchType .WHOLE_FIELD );
80
+ q .addSearchField ("grebi:description" , 250 , SearchType .CASE_INSENSITIVE_TOKENS );
79
81
q .addSearchField ("_text_" , 1 , SearchType .CASE_INSENSITIVE_TOKENS );
82
+ q .addFilter ("ols:isObsolete" , Set .of ("true" ), SearchType .WHOLE_FIELD , true );
80
83
for (var param : ctx .queryParamMap ().entrySet ()) {
81
84
if (param .getKey ().equals ("q" ) ||
82
85
param .getKey ().equals ("page" ) ||
@@ -88,15 +91,18 @@ public static void main(String[] args) throws ParseException, org.apache.commons
88
91
) {
89
92
continue ;
90
93
}
91
- q .addFilter (param .getKey (), param .getValue (), SearchType .WHOLE_FIELD );
94
+ q .addFilter (param .getKey (), param .getValue (), SearchType .WHOLE_FIELD , false );
95
+ }
96
+ for (var facetField : ctx .queryParams ("facet" )) {
97
+ q .addFacetField (facetField );
92
98
}
93
99
var page_num = ctx .queryParam ("page" );
94
100
if (page_num == null ) {
95
101
page_num = "0" ;
96
102
}
97
103
var size = ctx .queryParam ("size" );
98
104
if (size == null ) {
99
- size = "100 " ;
105
+ size = "10 " ;
100
106
}
101
107
var page = PageRequest .of (Integer .parseInt (page_num ), Integer .parseInt (size ));
102
108
var res = solr .searchNodesPaginated (q , page );
0 commit comments