Rubai Mandal
03/19/2023, 8:24 PMadd sdk implementation
have to be on top .Jason Bosco
03/19/2023, 9:05 PMRubai Mandal
03/19/2023, 10:19 PMRubai Mandal
03/19/2023, 10:28 PM{
"results": [
{
"facet_counts": [],
"found": 1,
"grouped_hits": [
{
"group_key": [
"<https://3238-180-151-109-60.in.ngrok.io/payment-page/android/base-sdk-integration/getting-sdk#add-sdk-implementation>"
],
"hits": [
{
"document": {
"anchor": "add-sdk-implementation",
"content": "After adding Assets Plugin and Hyper SDK to your project, please ensure you do a gradle sync and clean build",
"hierarchy": {
"lvl0": "1. Getting the SDK",
"lvl1": "Add SDK implementation",
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "1. Getting the SDK",
"hierarchy.lvl1": "Add SDK implementation",
"id": "158",
"type": "content",
"url": "<https://3238-180-151-109-60.in.ngrok.io/payment-page/android/base-sdk-integration/getting-sdk#add-sdk-implementation>"
},
"highlight": {
"content": {
"matched_tokens": [
"SDK"
],
"snippet": "After adding Assets Plugin and Hyper <mark>SDK</mark> to your project, please ensure you do a gradle sync and clean build",
"value": "After adding Assets Plugin and Hyper <mark>SDK</mark> to your project, please ensure you do a gradle sync and clean build"
}
},
"highlights": [
{
"field": "content",
"matched_tokens": [
"SDK"
],
"snippet": "After adding Assets Plugin and Hyper <mark>SDK</mark> to your project, please ensure you do a gradle sync and clean build",
"value": "After adding Assets Plugin and Hyper <mark>SDK</mark> to your project, please ensure you do a gradle sync and clean build"
}
],
"text_match": 1736172785157800000,
"text_match_info": {
"best_field_score": "3315687620864",
"best_field_weight": 14,
"fields_matched": 3,
"score": "1736172785157800051",
"tokens_matched": 3
}
},
{
"document": {
"anchor": "add-sdk-implementation",
"content": "To inject SDK as dependency in your application, include it in your application build.gradle dependencies",
"hierarchy": {
"lvl0": "1. Getting the SDK",
"lvl1": "Add SDK implementation",
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "1. Getting the SDK",
"hierarchy.lvl1": "Add SDK implementation",
"id": "157",
"type": "content",
"url": "<https://3238-180-151-109-60.in.ngrok.io/payment-page/android/base-sdk-integration/getting-sdk#add-sdk-implementation>"
},
"highlight": {
"content": {
"matched_tokens": [
"SDK"
],
"snippet": "To inject <mark>SDK</mark> as dependency in your application, include it in your application build.gradle dependencies",
"value": "To inject <mark>SDK</mark> as dependency in your application, include it in your application build.gradle dependencies"
}
},
"highlights": [
{
"field": "content",
"matched_tokens": [
"SDK"
],
"snippet": "To inject <mark>SDK</mark> as dependency in your application, include it in your application build.gradle dependencies",
"value": "To inject <mark>SDK</mark> as dependency in your application, include it in your application build.gradle dependencies"
}
],
"text_match": 1736172785157800000,
"text_match_info": {
"best_field_score": "3315687620864",
"best_field_weight": 14,
"fields_matched": 3,
"score": "1736172785157800051",
"tokens_matched": 3
}
},
{
"document": {
"anchor": "add-sdk-implementation",
"hierarchy": {
"lvl0": "1. Getting the SDK",
"lvl1": "Add SDK implementation",
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "1. Getting the SDK",
"hierarchy.lvl1": "Add SDK implementation",
"id": "156",
"type": "lvl1",
"url": "<https://3238-180-151-109-60.in.ngrok.io/payment-page/android/base-sdk-integration/getting-sdk#add-sdk-implementation>"
},
"highlight": {
"hierarchy": {
"lvl0": "1. Getting the SDK",
"lvl1": "Add SDK implementation",
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
}
},
"highlights": [],
"text_match": 1736172785157800000,
"text_match_info": {
"best_field_score": "3315687620864",
"best_field_weight": 14,
"fields_matched": 2,
"score": "1736172785157800050",
"tokens_matched": 3
}
}
]
}
],
"out_of": 346,
"page": 1,
"request_params": {
"collection_name": "Developer_Docs_1679258843",
"per_page": 10,
"q": "add sdk impl"
},
"search_cutoff": false,
"search_time_ms": 1
}
]
}
Jason Bosco
03/20/2023, 4:52 PMtypesenseSearchParameters: {
filter_by: '...',
sort_by: 'item_priority:desc',
},
And see if that helps?Jason Bosco
03/20/2023, 4:52 PMRubai Mandal
03/20/2023, 6:38 PMJason Bosco
03/20/2023, 6:39 PMRubai Mandal
03/20/2023, 6:40 PMJason Bosco
03/20/2023, 6:41 PMRubai Mandal
03/20/2023, 6:41 PMRubai Mandal
03/20/2023, 6:44 PMJason Bosco
03/20/2023, 6:46 PMRubai Mandal
03/20/2023, 6:47 PMJason Bosco
03/20/2023, 6:52 PMRubai Mandal
03/20/2023, 6:52 PMJason Bosco
03/20/2023, 6:53 PM3.4.0-0
of typesense-docsearch.js
and then try again?Jason Bosco
03/20/2023, 6:53 PMRubai Mandal
03/20/2023, 6:54 PMRubai Mandal
03/20/2023, 6:58 PMJason Bosco
03/20/2023, 6:59 PMJason Bosco
03/20/2023, 6:59 PMRubai Mandal
03/20/2023, 7:00 PMJason Bosco
03/20/2023, 7:00 PMRubai Mandal
03/20/2023, 7:00 PMJason Bosco
03/20/2023, 7:01 PM<!-- Before the closing body -->
<script src="<https://cdn.jsdelivr.net/npm/typesense-docsearch.js@3.4.0-0>"></script>
Jason Bosco
03/20/2023, 7:01 PM3.0.1
for the script tagJason Bosco
03/20/2023, 7:01 PM3.4.0-0
Rubai Mandal
03/20/2023, 7:02 PMJason Bosco
03/20/2023, 7:03 PMJason Bosco
03/20/2023, 7:03 PMRubai Mandal
03/20/2023, 7:03 PMJason Bosco
03/20/2023, 7:03 PMJason Bosco
03/20/2023, 7:04 PMRubai Mandal
03/20/2023, 7:05 PMRubai Mandal
03/20/2023, 7:13 PM(...)
at the start of hits if the match result are on a long text . so it's easy to understand such that there have some text before thatJason Bosco
03/20/2023, 7:40 PMbecause I searched a key & got the result on the top but I also got the example or text which is not requiredThe scraper just shows all content that is on the page, as specified by the css selectors. If you don’t want examples to show you, you want to exclude that via css selectors
Jason Bosco
03/20/2023, 7:42 PMand can we add (...) at the start of hits if the match result are on a long text . so it’s easy to understand such that there have some text before that
…
should be shown at the end of the hits technically… looks like that’s hidden in the UI.
In your docsearch initialization code, could you try adding this:
typesenseSearchParameters: {
filter_by: '...',
highlight_affix_num_tokens: 3,
},
Rubai Mandal
03/20/2023, 7:46 PMJason Bosco
03/20/2023, 7:47 PMRubai Mandal
03/20/2023, 7:49 PMRubai Mandal
03/20/2023, 7:50 PMJason Bosco
03/20/2023, 7:51 PMJason Bosco
03/20/2023, 7:52 PMRubai Mandal
03/20/2023, 7:52 PMRubai Mandal
03/20/2023, 7:54 PMJason Bosco
03/20/2023, 8:42 PMsnippet_threshold: 5
?Rubai Mandal
03/20/2023, 8:47 PMJason Bosco
03/20/2023, 8:47 PMtypesenseSearchParameters: {
filter_by: '...',
snippet_threshold: 5,
},
Jason Bosco
03/20/2023, 8:48 PMRubai Mandal
03/20/2023, 8:49 PM...
on hitsJason Bosco
03/20/2023, 8:49 PMJason Bosco
03/20/2023, 8:50 PMRubai Mandal
03/20/2023, 8:50 PMRubai Mandal
03/20/2023, 8:51 PMsnippet_threshold: 5,
but still getting same result like previous oneRubai Mandal
03/20/2023, 8:52 PMcurl '<http://localhost:8108/multi_search?x-typesense-api-key=xyz>' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: text/plain' \
-H 'Origin: <http://localhost>' \
-H 'Pragma: no-cache' \
-H 'Referer: <http://localhost/>' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-site' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' \
-H 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
--data-raw '{"searches":[{"collection":"Developer_Docs","q":"to be present","query_by":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content","include_fields":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content,anchor,url,type,id","highlight_full_fields":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content","group_by":"url","group_limit":3,"sort_by":"item_priority:desc","filter_by":"product_tag:=payment-page_android","snippet_threshold":5}]}' \
--compressed
Jason Bosco
03/20/2023, 8:53 PMRubai Mandal
03/20/2023, 8:53 PMRubai Mandal
03/20/2023, 8:54 PMJason Bosco
03/20/2023, 8:54 PMRubai Mandal
03/20/2023, 8:55 PMRubai Mandal
03/20/2023, 9:05 PMJason Bosco
03/20/2023, 9:09 PM"snippet_threshold": 5,
"highlight_affix_num_tokens": 3
Rubai Mandal
03/20/2023, 9:12 PMJason Bosco
03/20/2023, 9:12 PMJason Bosco
03/20/2023, 9:12 PMJason Bosco
03/20/2023, 9:12 PMRubai Mandal
03/20/2023, 9:14 PMJason Bosco
03/20/2023, 9:14 PMhttps://typesense-community.slack.com/files/U04RHF46W5B/F05044HG4M6/screenshot_2023-03-21_at_1.23.31_am.png▾
Rubai Mandal
03/20/2023, 9:15 PMJason Bosco
03/20/2023, 9:16 PMJason Bosco
03/20/2023, 9:16 PMRubai Mandal
03/20/2023, 9:17 PM...
for the text . actually I am trying to say that the screenshot are taken different time but getting same result that's why it's look like sameRubai Mandal
03/20/2023, 9:19 PMto be present
,the 2nd hits . it's a long text that's why I want to add ...
at startRubai Mandal
03/20/2023, 9:21 PMJason Bosco
03/20/2023, 9:36 PMJason Bosco
03/20/2023, 9:36 PMJason Bosco
03/20/2023, 9:39 PMRubai Mandal
03/20/2023, 9:48 PM...
. I got this from https://docusaurus.io/ siteJason Bosco
03/20/2023, 9:55 PM3.4.0-1
and check now?Rubai Mandal
03/20/2023, 10:04 PMJason Bosco
03/21/2023, 3:17 AM3.4.0-8
Rubai Mandal
03/21/2023, 8:54 AMRubai Mandal
03/21/2023, 9:12 AMRubai Mandal
03/21/2023, 9:13 AMJason Bosco
03/21/2023, 1:39 PMRubai Mandal
03/21/2023, 2:10 PMcurl '<http://localhost:8108/multi_search?x-typesense-api-key=xyz>' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: text/plain' \
-H 'Origin: <http://localhost:3000>' \
-H 'Pragma: no-cache' \
-H 'Referer: <http://localhost:3000/>' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-site' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' \
-H 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
--data-raw '{"searches":[{"collection":"Developer_Docs","q":"session api","query_by":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content","include_fields":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content,anchor,url,type,id","highlight_full_fields":"hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content","group_by":"url","group_limit":3,"sort_by":"item_priority:desc","snippet_threshold":5,"highlight_affix_num_tokens":3,"filter_by":"product_tag:=payment-page_android"}]}' \
--compressed
https://gist.github.com/rubai99/8f21fb34638fd68f0683137d4e6ee810 .
sometimes works ,sometimes braking . now it's breakingJason Bosco
03/21/2023, 4:07 PM<script src="<https://cdn.jsdelivr.net/npm/typesense-docsearch.js@3.4.0-8/dist/umd/index.js>"></script>
And then try replicating the same error in that screenshot and post a stack trace?
(This is hopefully pulls in the source-map and shows a proper stack trace)Rubai Mandal
03/21/2023, 4:28 PMJason Bosco
03/21/2023, 4:30 PMRubai Mandal
03/21/2023, 4:30 PMJason Bosco
03/21/2023, 4:31 PMRubai Mandal
03/21/2023, 4:32 PMRubai Mandal
03/21/2023, 4:34 PMJason Bosco
03/21/2023, 4:34 PMJason Bosco
03/21/2023, 4:34 PMRubai Mandal
03/21/2023, 4:34 PMJason Bosco
03/21/2023, 4:37 PM3.4.0-9
?Rubai Mandal
03/21/2023, 4:37 PMRubai Mandal
03/21/2023, 4:38 PMJason Bosco
03/21/2023, 4:39 PMJason Bosco
03/21/2023, 4:40 PMRubai Mandal
03/21/2023, 4:44 PMRubai Mandal
03/21/2023, 4:47 PMJason Bosco
03/21/2023, 4:48 PMRubai Mandal
03/22/2023, 12:37 PMpayment-page
& upi-inapp
in our documentation ,
suppose 1st time we run the scraper for collection Developer_Docs_upi-inapp
and again run the scraper for other collection of Developer_Docs_payment-page
, so can we access both collection in a single documentation ,
the benefit of this is when anything change happens for a product then we can scrape again for this particular product 's collection only . so here we don't need to run the scraper every product's collection .
for reference you can check our documentation https://docs.juspay.in/Jason Bosco
03/22/2023, 3:40 PMRubai Mandal
03/23/2023, 7:31 AMTYPESENSE_API_KEY=xyz
TYPESENSE_HOST=host.docker.internal
TYPESENSE_PORT=8108
TYPESENSE_PROTOCOL=http
Rubai Mandal
03/23/2023, 7:05 PMJason Bosco
03/23/2023, 7:29 PMJason Bosco
03/23/2023, 7:30 PMJason Bosco
03/23/2023, 7:30 PMTYPESENSE_API_KEY=<GENERATED_FROM_DASHBOARD>
TYPESENSE_HOST=<http://xxxx.a1.typesense.net|xxxx.a1.typesense.net>
TYPESENSE_PORT=443
TYPESENSE_PROTOCOL=https
Jason Bosco
03/23/2023, 7:31 PMRubai Mandal
03/23/2023, 7:36 PMJason Bosco
03/23/2023, 7:37 PMRubai Mandal
03/23/2023, 7:38 PMJason Bosco
03/23/2023, 7:49 PMJason Bosco
03/23/2023, 7:49 PMRubai Mandal
03/25/2023, 10:21 PMRubai Mandal
03/25/2023, 10:37 PMJason Bosco
03/26/2023, 1:52 AMJason Bosco
03/26/2023, 1:53 AMRubai Mandal
03/26/2023, 11:11 AMRubai Mandal
03/26/2023, 6:51 PMJason Bosco
03/26/2023, 7:59 PMRubai Mandal
03/26/2023, 11:32 PMJason Bosco
03/27/2023, 12:45 AMRubai Mandal
03/27/2023, 9:45 AMhost='host.docker.internal'
to host='localhost'
, cause we don't use docker as of now to run the scraper . we run it from VS code via an API and getting this errorJason Bosco
03/27/2023, 3:54 PM.env
file you’re usingRubai Mandal
03/28/2023, 7:44 AM