Skip to content

Commit

Permalink
add api endpoint to get query ast (#5212)
Browse files Browse the repository at this point in the history
* add api to get quickwit ast, tantivy ast, and some query plan detail

* add test for search-plan
  • Loading branch information
trinity-1686a authored Jul 15, 2024
1 parent 549e129 commit ddcb138
Show file tree
Hide file tree
Showing 10 changed files with 492 additions and 44 deletions.
7 changes: 7 additions & 0 deletions quickwit/quickwit-proto/protos/quickwit/search.proto
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ service SearchService {
rpc ListFields(ListFieldsRequest) returns (ListFieldsResponse);

rpc LeafListFields(LeafListFieldsRequest) returns (ListFieldsResponse);

// Describe how a search would be processed.
rpc SearchPlan(SearchRequest) returns (SearchPlanResponse);
}

/// Scroll Request
Expand Down Expand Up @@ -298,6 +301,10 @@ message SearchResponse {
optional string scroll_id = 6;
}

message SearchPlanResponse {
string result = 1;
}

message SplitSearchError {
// The searcherror that occurred formatted as string.
string error = 1;
Expand Down
85 changes: 85 additions & 0 deletions quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions quickwit/quickwit-search/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ pub use crate::cluster_client::ClusterClient;
pub use crate::error::{parse_grpc_error, SearchError};
use crate::fetch_docs::fetch_docs;
pub use crate::root::{
check_all_index_metadata_found, jobs_to_leaf_request, root_search, IndexMetasForLeafSearch,
SearchJob,
check_all_index_metadata_found, jobs_to_leaf_request, root_search, search_plan,
IndexMetasForLeafSearch, SearchJob,
};
pub use crate::search_job_placer::{Job, SearchJobPlacer};
pub use crate::search_response_rest::SearchResponseRest;
pub use crate::search_response_rest::{SearchPlanResponseRest, SearchResponseRest};
pub use crate::search_stream::root_search_stream;
pub use crate::service::{MockSearchService, SearchService, SearchServiceImpl};

Expand Down
Loading

0 comments on commit ddcb138

Please sign in to comment.