Hussain Sakariya
10/24/2024, 6:08 AM{
collection: "ashok-pydev-store_56043503823",
filter_by: "date:>0&&is_deleted:0&&inventory_qty:>0",
highlight_affix_num_tokens: 2,
highlight_fields: "title",
include_fields: "id,title,description,vendor,handle,tags,variants,options_ts7,images,image,key_words_ts7,review_rating_value_ts7,review_rating_count_ts7,product_type,inventory_qty,product_id",
max_candidates:: 100,
min_len_1typo: 4,
min_len_2typo: 5,
page: 1,
per_page: 5,
pre_segmented_query: true,
prioritize_token_position: true,
q: "watch",
query_by: "title,description,product_type,tags,vendor",
query_by_weights: "10,4,3,2,1",
sort_by: "_eval(inventory_qty:>0):desc",
text_match_type: "max_weight",
use_cache: true
}
Response
{
"highlight": {
"title": {
"matched_tokens": [
"Watch"
],
"snippet": "1.89 Women's Roman Mesh Strap <mark>Watch</mark> - A New Day™ - Gray"
}
}
}
But i want this in response
{
"highlight": {
"title": {
"matched_tokens": [
"Watch"
],
"snippet": "Mesh Strap <mark>Watch</mark> - A New"
}
}
}
as your document, we use this parameter highlight_affix_num_tokens = 2, but it's not working for us
Thanks