Skip to content

Commit

Permalink
Move up to be class level
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-sammons committed Oct 1, 2024
1 parent 8b96df2 commit a05fabd
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@

public class SearchResultUtils {
private static final ObjectMapper objectMapper = new ObjectMapper();
private static final SearchModule searchModule = new SearchModule(Settings.EMPTY, List.of());
private static final NamedXContentRegistry namedXContentRegistry =
new NamedXContentRegistry(searchModule.getNamedXContents());

public static Map<String, Object> fromValueStruct(AstraSearch.Struct struct) {
Map<String, Object> returnMap = new HashMap<>();
Expand Down Expand Up @@ -669,9 +672,7 @@ public static AstraSearch.SearchRequest.SearchAggregation.FiltersAggregation toF

public static SearchQuery fromSearchRequest(AstraSearch.SearchRequest searchRequest) {
QueryBuilder queryBuilder = null;
SearchModule searchModule = new SearchModule(Settings.EMPTY, List.of());
NamedXContentRegistry namedXContentRegistry =
new NamedXContentRegistry(searchModule.getNamedXContents());

if (!searchRequest.getQuery().isEmpty()) {
try {
JsonXContentParser jsonXContentParser =
Expand Down

0 comments on commit a05fabd

Please sign in to comment.