forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move query interceptor to an internal plugin interface (elastic#120308)
Query interceptor is meant for internal modules to implement, not any external plugin. Yet it is defined on SearchPlugin that is available to all plugin authors. This commit creates an InternalSearchPlugin interface and moves the query interceptor method to that.
- Loading branch information
Showing
5 changed files
with
40 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
server/src/main/java/org/elasticsearch/plugins/internal/InternalSearchPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
package org.elasticsearch.plugins.internal; | ||
|
||
import org.elasticsearch.plugins.internal.rewriter.QueryRewriteInterceptor; | ||
|
||
import java.util.List; | ||
|
||
import static java.util.Collections.emptyList; | ||
|
||
public interface InternalSearchPlugin { | ||
|
||
/** | ||
* @return Applicable {@link QueryRewriteInterceptor}s configured for this plugin. | ||
* Note: This is internal to Elasticsearch's API and not extensible by external plugins. | ||
*/ | ||
default List<QueryRewriteInterceptor> getQueryRewriteInterceptors() { | ||
return emptyList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters