Docusaurus Integration - Search Results Ordering & Missing Highlight
TLDR Abhishek reported issues with search result ordering and missing highlights in docusaurus integration. Jason explained the result differences between modal and search page. Abhishek submitted a fix for the highlight issue.
Mar 03, 2023 (7 months ago)
Abhishek
06:47 PMAbhishek
06:48 PMaudit trail
result json -
{
"results": [
{
"facet_counts": [],
"found": 5,
"grouped_hits": [
{
"group_key": [
""
],
"hits": [
{
"document": {
"anchor": "docusaurus-base-url-issue-banner-container",
"content": "Audit Trail",
"hierarchy": {
"lvl0": "Your Clerky Account",
"lvl1": null,
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "Your Clerky Account",
"id": "10",
"type": "content",
"url": ""
},
"highlight": {
"content": {
"matched_tokens": [
"Audit",
"Trail"
],
"snippet": "<mark>Audit</mark> <mark>Trail</mark>",
"value": "<mark>Audit</mark> <mark>Trail</mark>"
}
},
"highlights": [
{
"field": "content",
"matched_tokens": [
"Audit",
"Trail"
],
"snippet": "<mark>Audit</mark> <mark>Trail</mark>",
"value": "<mark>Audit</mark> <mark>Trail</mark>"
}
],
"text_match": 1157451471441625000,
"text_match_info": {
"best_field_score": "2211897868544",
"best_field_weight": 8,
"fields_matched": 1,
"score": "1157451471441625153",
"tokens_matched": 2
}
}
]
},
{
"group_key": [
""
],
"hits": [
{
"document": {
"anchor": "audit-trail",
"content": "Your Clerky Account: Audit Trails",
"hierarchy": {
"lvl0": "Audit Trail ",
"lvl1": null,
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "Audit Trail ",
"id": "14",
"type": "content",
"url": ""
},
"highlight": {
"content": {
"matched_tokens": [
"Audit",
"Trail"
],
"snippet": "Your Clerky Account: <mark>Audit</mark> <mark>Trail</mark>s",
"value": "Your Clerky Account: <mark>Audit</mark> <mark>Trail</mark>s"
}
},
"highlights": [
{
"field": "content",
"matched_tokens": [
"Audit",
"Trail"
],
"snippet": "Your Clerky Account: <mark>Audit</mark> <mark>Trail</mark>s",
"value": "Your Clerky Account: <mark>Audit</mark> <mark>Trail</mark>s"
}
],
"text_match": 1157451471441100800,
"text_match_info": {
"best_field_score": "2211897868288",
"best_field_weight": 15,
"fields_matched": 2,
"score": "1157451471441100922",
"tokens_matched": 2
}
},
{
"document": {
"anchor": "audit-trail",
"content": "Audit trails help you monitor activity in your workspace by tracking who changed what and when. Depending on what you're looking at, an audit trail can appear as a sidebar menu or as an option in a More (...) menu",
"hierarchy": {
"lvl0": "Audit Trail ",
"lvl1": null,
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "Audit Trail ",
"id": "13",
"type": "content",
"url": ""
},
"highlight": {
"content": {
"matched_tokens": [
"Audit",
"trail"
],
"snippet": "<mark>Audit</mark> <mark>trail</mark>s help you monitor activity",
"value": "<mark>Audit</mark> <mark>trail</mark>s help you monitor activity in your workspace by tracking who changed what and when. Depending on what you're looking at, an <mark>audit</mark> <mark>trail</mark> can appear as a sidebar menu or as an option in a More (...) menu"
}
},
"highlights": [
{
"field": "content",
"matched_tokens": [
"Audit",
"trail"
],
"snippet": "<mark>Audit</mark> <mark>trail</mark>s help you monitor activity",
"value": "<mark>Audit</mark> <mark>trail</mark>s help you monitor activity in your workspace by tracking who changed what and when. Depending on what you're looking at, an <mark>audit</mark> <mark>trail</mark> can appear as a sidebar menu or as an option in a More (...) menu"
}
],
"text_match": 1157451471441100800,
"text_match_info": {
"best_field_score": "2211897868288",
"best_field_weight": 15,
"fields_matched": 2,
"score": "1157451471441100922",
"tokens_matched": 2
}
},
{
"document": {
"anchor": "audit-trail",
"hierarchy": {
"lvl0": "Audit Trail ",
"lvl1": null,
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "Audit Trail ",
"id": "12",
"type": "lvl0",
"url": ""
},
"highlight": {
"hierarchy": {
"lvl0": "Audit Trail ",
"lvl1": null,
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
}
},
"highlights": [],
"text_match": 1157451471441100800,
"text_match_info": {
"best_field_score": "2211897868288",
"best_field_weight": 15,
"fields_matched": 1,
"score": "1157451471441100921",
"tokens_matched": 2
}
}
]
},
{
"group_key": [
" "
],
"hits": [
{
...
Abhishek
06:49 PMAbhishek
06:50 PM<mark>Audit</mark> <mark>Trail</mark>
in the first group hites and then Your Clerky Account: <mark>Audit</mark> <mark>Trail</mark>s
in the second group hit, shouldn't that be the 2nd result?Abhishek
06:52 PMAbhishek
06:53 PMAbhishek
06:54 PM {
"document": {
"anchor": "audit-trail",
"hierarchy": {
"lvl0": "Audit Trail ",
"lvl1": null,
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
},
"hierarchy.lvl0": "Audit Trail ",
"id": "12",
"type": "lvl0",
"url": ""
},
"highlight": {
"hierarchy": {
"lvl0": "Audit Trail ",
"lvl1": null,
"lvl2": null,
"lvl3": null,
"lvl4": null,
"lvl5": null,
"lvl6": null
}
},
"highlights": [],
"text_match": 1157451471441100800,
"text_match_info": {
"best_field_score": "2211897868288",
"best_field_weight": 15,
"fields_matched": 1,
"score": "1157451471441100921",
"tokens_matched": 2
}
}
Mar 04, 2023 (7 months ago)
Abhishek
07:59 AMCould you confirm if this is a bug and possible fixes.
Jason
08:03 PMJason
08:04 PMJason
08:05 PMMar 05, 2023 (7 months ago)
Abhishek
05:55 PMMar 06, 2023 (7 months ago)
Abhishek
09:06 AMTypesense
Indexed 2779 threads (79% resolved)
Similar Threads
Troubleshooting Issues with DocSearch Hits and Scraper Configuration
Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.
Duplicate Search Results Issue in Web Crawler Configuration
Lane is dealing with problems related to duplicate search results from their web crawler. Jason suggested that links in the sitemap might cause this issue, but this remains unresolved.
Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.
Inconsistent Search Results in Typesense UI vs Dashboard
Abhishek reports inconsistent search results in the typesense UI vs dashboard integration when using page rank with Docusaurus plugin. Jason suggests creating a GitHub issue while Abhishek seeks clarification on prioritizing exact matches.
Query on "weighted_score" & Issue with Synonym Highlighting
Stefan asked about "weighted_score" field and reported a possible synonym highlighting issue. Kishore Nallan clarified the use of "weighted_score". The possible synonym issue is still being investigated.