feat: show distinct attribute keys in cmd-k Attributes tab
Add GET /search/attributes/keys endpoint that queries distinct attribute key names from ClickHouse using JSONExtractKeys. Attribute keys appear in the cmd-k Attributes tab alongside attribute value matches from exchange results. - SearchIndex.distinctAttributeKeys() interface method - ClickHouseSearchIndex implementation using arrayJoin(JSONExtractKeys) - SearchController /attributes/keys endpoint - useAttributeKeys() React Query hook - buildSearchData includes attribute keys as 'attribute' category items Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,10 @@ public class SearchService {
|
||||
return searchIndex.count(request);
|
||||
}
|
||||
|
||||
public List<String> distinctAttributeKeys() {
|
||||
return searchIndex.distinctAttributeKeys();
|
||||
}
|
||||
|
||||
public ExecutionStats stats(Instant from, Instant to) {
|
||||
return statsStore.stats(from, to);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.cameleer3.server.core.search.SearchRequest;
|
||||
import com.cameleer3.server.core.search.SearchResult;
|
||||
import com.cameleer3.server.core.storage.model.ExecutionDocument;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SearchIndex {
|
||||
|
||||
SearchResult<ExecutionSummary> search(SearchRequest request);
|
||||
@@ -14,4 +16,7 @@ public interface SearchIndex {
|
||||
void index(ExecutionDocument document);
|
||||
|
||||
void delete(String executionId);
|
||||
|
||||
/** Returns distinct attribute key names across all executions. */
|
||||
List<String> distinctAttributeKeys();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user