Boost Search on Taxonomy Pages
- prakashreddy.imduriParticipant1 year, 11 months ago #31068
Hi,
I have added boost to search results based on Featured taxonomy, its working fine but its also effecting search results on the main search page. How can I limit it to only taxonomy pages only ? Can you help me with an action to not alter any results if not taxonomy page.prakashreddy.imduriParticipant1 year, 11 months ago #31189Hello, when we turn on boost, the search is not searching inside custom product fields content, which is working without boost enabled. Can you tell me what’s wrong with this setting:
We indexed all the custom fields, whenever we search a keyword from custom field, its is working without boost functionality enabled. Fuzzy search and partial match is also turned off.prakashreddy.imduriParticipant1 year, 11 months ago #31196I added boost for all custom fields , still not working. the results when trying to search within the content of custom field is empty with boost turned on.
prakashreddy.imduriParticipant1 year, 11 months ago #31202we are trying with exact text copied from custom field, also tried with all lowercase, we are using the field type as long text (_t) , as without this indexing was breaking if we use _str.
wpsolrKeymaster1 year, 11 months ago #31203Please activate the Query Monitor extension, and let me see what the WPSOLR query looks like.
prakashreddy.imduriParticipant1 year, 11 months ago #31204Here is the query :
{
“from”: 0,
“size”: 20,
“track_total_hits”: true,
“sort”: [
{
“publication_date_dt”: {
“order”: “desc”
}
}
],
“_source”: [
“id”,
“PID”,
“type”,
“meta_type_s”,
“title”,
“numcomments”,
“comments”,
“displaydate”,
“displaymodified”,
“*categories_str”,
“author”,
“*post_thumbnail_href_str”,
“*post_href_str”,
“snippet_s”
],
“query”: {
“function_score”: {
“functions”: [
{
“filter”: {
“match”: {
“product_visibility_str”: “featured”
}
},
“weight”: 10
}
],
“query”: {
“bool”: {
“must”: {
“query_string”: {
“fields”: [
“title^10”,
“product_visibility_t^10”,
“publication_date_t^15”,
“summary_t”,
“figures_str”,
“tables_str”,
“contents_str”,
“synopsis_str”,
“content^0.5”
],
“query”: “(*)”,
“default_operator”: “AND”
}
},
“filter”: {
“bool”: {
“must”: [
{
“bool”: {
“must_not”: [
{
“terms”: {
“post_status_s”: [
“draft”,
“pending”,
“trash”,
“future”,
“private”,
“auto-draft”
]
}
}
]
}
},
{
“bool”: {
“must”: [
{
“bool”: {
“must”: [
{
“terms”: {
“non_flat_hierarchy_industry_str”: [
“Technology”
]
}
}
]
}
},
{
“bool”: {
“must”: {
“term”: {
“non_flat_hierarchy_industry_str”: “Technology”
}
}
}
}
]
}
},
……prakashreddy.imduriParticipant1 year, 11 months ago #31206okay, here is with the search query :
{
“from”: 0,
“size”: 20,
“track_total_hits”: true,
“highlight”: {
“require_field_match”: false,
“pre_tags”: [“”],
“post_tags”: [“<\/b>”],
“fields”: {
“title”: {
“fragment_size”: 100,
“number_of_fragments”: 1
}
}
},
“_source”: [“id”, “PID”, “type”, “meta_type_s”, “title”, “numcomments”, “comments”, “displaydate”, “displaymodified”, “*categories_str”, “author”, “*post_thumbnail_href_str”, “*post_href_str”, “snippet_s”],
“query”: {
“function_score”: {
“functions”: [{
“filter”: {
“match”: {
“product_visibility_str”: “featured”
}
},
“weight”: 11
}],
“query”: {
“bool”: {
“must”: {
“query_string”: {
“fields”: [“product_visibility_t^11”, “publication_date_t^12”, “title^10”, “summary_t”, “figures_str”, “tables_str”, “contents_str”, “synopsis_str”, “content^0.5”],
“query”: “(retail~1)”,
“default_operator”: “AND”
}
},
“filter”: {
“bool”: {
“must”: [{
“bool”: {
“must_not”: [{
“terms”: {
“post_status_s”: [“draft”, “pending”, “trash”, “future”, “private”, “auto-draft”]
}
}]
}
}, {
“bool”: {
“must_not”: [{
“terms”: {
“type”: [“shop_order”]
}
}]
}
},prakashreddy.imduriParticipant1 year, 11 months ago #31234with fuzzy search turned on, I am not able to search post content [custom acf fields], and fuzzy search is needed too as I need search to also match common spelling mistakes, How can I make this both work ?
As we want search to also look for keywords in title, content and custom acf fields which we indexed, and provide better matching results.- This reply was modified 1 year, 11 months ago by prakashreddy.imduri.
prakashreddy.imduriParticipant1 year, 11 months ago #31237these all fields might contain the word retail :
“title^10”, “summary_t”, “figures_str”, “tables_str”, “contents_str”, “synopsis_str”,
You must be logged in to reply to this topic.