From 832f5dbf525ebddbcfa8873b5b3c88325f446a3c Mon Sep 17 00:00:00 2001 From: mustafa-rezae Date: Sat, 15 Mar 2025 13:41:29 +0330 Subject: [PATCH] Connecting search apis --- apis/hadithApi.js | 73 --- apis/hadithaApi.js | 4 + components/haditha/AutoComplation.vue | 158 ++--- components/haditha/search-page/SearchList.vue | 32 +- .../haditha/search-page/[id]/[slug]/index.vue | 0 layouts/HadithaLayout.vue | 6 + pages/haditha/search/[id]/[slug]/index.vue | 497 +++++++++++++++ pages/haditha/search/index.vue | 17 +- types/hadithType.ts | 571 ++++++++++-------- 9 files changed, 954 insertions(+), 404 deletions(-) delete mode 100644 apis/hadithApi.js create mode 100644 apis/hadithaApi.js create mode 100644 components/haditha/search-page/[id]/[slug]/index.vue create mode 100644 pages/haditha/search/[id]/[slug]/index.vue diff --git a/apis/hadithApi.js b/apis/hadithApi.js deleted file mode 100644 index f6b4f16..0000000 --- a/apis/hadithApi.js +++ /dev/null @@ -1,73 +0,0 @@ -export default { - items: { - get: "monir/search/get/byid/", - }, - Farhanghestan: { - search_normal: "monir/search/0/10", - search_And: "monir/search/and/0/10", - search_Phrase: "monir/search/phrase/0/10", - search_Code: "monir/search/code/all/0/10", - }, - subject: { - add: "sanad/subject/add", - // edit: "sanad/subject/edit", - delete: "sanad/subject/delete", - order: "monir/sanad/subject/order", - }, - index: { - Index_one: "safheh212/one", - index_multi: "safheh212/multi", - }, - nesha: { - search_normal: "monir/search/nesha/0/10", - }, - wordSWeight: { - list: "ngrams/elastic/{{index_key}}/1to3", - }, - rezome: { - add: "rezumeh", - get: "rezumeh/get", - }, - navigation: { - list: "navigate/list/@entity", - report: - "navigate/report/{{index_key}}/{{offset}}/{{limit}}/{{aggs}}/{{filter}}", - reportItem: "navigate/report/items", - reportSubjectItem: "navigate/report/subject={{subject_title}}/items", - }, - bnavigation: { - list: "repo/navigate/list", - report: "repo/navigate/report", - reportItem: "repo/navigate/report/items", - reportSubjectItem: "repo/navigate/report/subject={{subject_title}}/items", - }, - schema: { - list: "schema", - }, - search: { - autoComplate: - "{{appname}}/complation/{{index_key}}/{{filter}}", - logAutoComplate: - "searchlog/complation/{{filter}}", - default: - "{{appname}}/data/{{index_key}}/{{sortKey}}/{{offset}}/{{limit}}/{{filter}}", - queryNormal: - "{{appname}}/search/{{index_key}}/{{search_type}}/{{sortKey}}/{{field_collapse}}/{{offset}}/{{limit}}/{{filter}}", - textSearch: - "{{appname}}/search/text/{{index_key}}/{{field}}/{{offset}}/{{limit}}/{{filter}}", - }, - chart: { - timeline: "{{appname}}/data/timeline/{{index_key}}", - xy: "{{appname}}/data/xy/{{index_key}}/{{field_key}}", - items: - "navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}", - chartTreeMap: "list/project/treemap/{{chart_key}}/{{filter}}", - treeItems:"navigate/report/items/search/{{index_key}}/{{offset}}/{{limit}}/{{filter}}", - tree: "list/subject/list", - graph:"repo/majles/{{to_key}}/relation" - }, - synonym:{ - getSynonyms:"synonym/get/words", - synonymSearch:"search/qasection/synonym/@listkey/@offset/@limit/@q", - } -}; diff --git a/apis/hadithaApi.js b/apis/hadithaApi.js new file mode 100644 index 0000000..a6df26e --- /dev/null +++ b/apis/hadithaApi.js @@ -0,0 +1,4 @@ +export default { + search: + "repo/monir/search/@index_key/@search_type/@type_key/@listkey/@field_collapsed/@offset/@limit/@q=none", +}; diff --git a/components/haditha/AutoComplation.vue b/components/haditha/AutoComplation.vue index 7bb54ef..c814e77 100644 --- a/components/haditha/AutoComplation.vue +++ b/components/haditha/AutoComplation.vue @@ -1,4 +1,11 @@