From e11eb53b49599c76065420adf73cf01de21c52d3 Mon Sep 17 00:00:00 2001 From: Joep Meindertsma Date: Thu, 11 Nov 2021 21:42:39 +0100 Subject: [PATCH] #40 add properties for search --- lib/defaults/default_store.json | 23 ++++++++++++++++++++++- lib/src/urls.rs | 4 +++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/defaults/default_store.json b/lib/defaults/default_store.json index bb872c43d..d5ed42872 100644 --- a/lib/defaults/default_store.json +++ b/lib/defaults/default_store.json @@ -20,7 +20,7 @@ "https://atomicdata.dev/properties/shortname": "results" }, { - "@id": "https://atomicdata.dev/properties/searchQuery", + "@id": "https://atomicdata.dev/properties/search/query", "https://atomicdata.dev/properties/datatype": "https://atomicdata.dev/datatypes/string", "https://atomicdata.dev/properties/description": "A full-text search query. \n\nFor all features, see [the Tantivy docs](https://docs.rs/tantivy/0.16.1/tantivy/query/struct.QueryParser.html)", "https://atomicdata.dev/properties/isA": [ @@ -30,6 +30,27 @@ "https://atomicdata.dev/properties/parent": "https://atomicdata.dev/properties", "https://atomicdata.dev/properties/shortname": "q" }, + { + "@id": "https://atomicdata.dev/properties/search/limit", + "https://atomicdata.dev/properties/datatype": "https://atomicdata.dev/datatypes/integer", + "https://atomicdata.dev/properties/description": "Maximum number of search results.", + "https://atomicdata.dev/properties/isA": [ + "https://atomicdata.dev/classes/Property" + ], + "https://atomicdata.dev/properties/parent": "https://atomicdata.dev/properties", + "https://atomicdata.dev/properties/shortname": "limit" + }, + { + "@id": "https://atomicdata.dev/properties/search/property", + "https://atomicdata.dev/properties/datatype": "https://atomicdata.dev/datatypes/atomicURL", + "https://atomicdata.dev/properties/description": "Filter results by this property URL.", + "https://atomicdata.dev/properties/isA": [ + "https://atomicdata.dev/classes/Property" + ], + "https://atomicdata.dev/properties/parent": "https://atomicdata.dev/properties", + "https://atomicdata.dev/properties/classType": "https://atomicdata.dev/classes/Property", + "https://atomicdata.dev/properties/shortname": "property" + }, { "@id": "https://atomicdata.dev/properties/isDynamic", "https://atomicdata.dev/properties/datatype": "https://atomicdata.dev/datatypes/boolean", diff --git a/lib/src/urls.rs b/lib/src/urls.rs index 9f179c330..1ce2a6dd0 100644 --- a/lib/src/urls.rs +++ b/lib/src/urls.rs @@ -59,7 +59,9 @@ pub const COLLECTION_SORT_DESC: &str = "https://atomicdata.dev/properties/collec pub const ENDPOINT_PARAMETERS: &str = "https://atomicdata.dev/properties/endpoint/parameters"; pub const ENDPOINT_RESULTS: &str = "https://atomicdata.dev/properties/endpoint/results"; pub const PATH: &str = "https://atomicdata.dev/properties/path"; -pub const SEARCH_QUERY: &str = "https://atomicdata.dev/properties/searchQuery"; +pub const SEARCH_QUERY: &str = "https://atomicdata.dev/properties/search/query"; +pub const SEARCH_LIMIT: &str = "https://atomicdata.dev/properties/search/limit"; +pub const SEARCH_PROPERTY: &str = "https://atomicdata.dev/properties/search/property"; // ... for Hierarchy / Drive pub const PARENT: &str = "https://atomicdata.dev/properties/parent"; pub const READ: &str = "https://atomicdata.dev/properties/read";