Solr问题:搜索产品无结果

2020-09-09 09:28发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)大家好。 我正在使用Hybri...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


大家好。

我正在使用Hybris 1811.4版本,并且遇到solr问题。 索引工作成功,建议也行。 顺便说一句,产品搜索检索到200条响应,但没有任何产品结果。 " totalResults":0

在日志控制台上,我看不到任何错误或任何有用的日志。

我在solr面板控制服务器上进行了检查,显然,产品已正确索引。 建议如何起作用而搜索不起作用?

有人可以帮助我吗?

谢谢。

编辑:

Solr通过http工作

这是我通过调试DefaultFacetSearchStrategy获得的solrQuery:

  yq = _query _:" \ {\!multiMaxScore \ + tie%3D0.0 \} \(\\(keywords_text \:Shirt \ ^ 20.0 \)\ + OR \ + \(manufacturererName_text \:Shirt \  ^ 40.0 \)\ + OR \ + \(description_text \:Shirt \ ^ 25.0 \)\ + OR \ + \(categoryName_text_mv \:Shirt \ ^ 20.0 \)\ + OR \ + \(name_text \:Shirt \ ^ 50.0  \)\)\ + OR \ + \(\(code_string \:Shirt \〜\)\ + OR \ + \(keywords_text \:Shirt \〜\ ^ 10.0 \)\ + OR \ + \(manufacturererName_text \:Shirt  \〜\ ^ 20.0 \)\ + OR \ + \(description_text \:Shirt \〜\ ^ 10.0 \)\ + OR \ + \(categoryName_text_mv \:Shirt \〜\ ^ 10.0 \)\ + OR \ + \(  ean_string \:衬衫\〜\)\ + OR \ + \(name_text \:衬衫\〜\ ^ 25.0 \)\)\ + OR \ + \(\(code_string \:\"衬衫\" \ ^ 90.0 \)  \ + OR \ + \(关键字文字\:\"衬衫\" \ ^ 40.0 \)\ + OR \ + \(厂商名称_文字\:\"衬衫\" \ ^ 80.0 \)\ + OR \ + \(description_text \ ::  \" Shirt \" \ ^ 50.0 \)\ + OR \ + \(categoryName_text_mv \:\" Shirt \" \ ^ 40.0 \)\ + OR \ + \(ean_string \:\" Shirt \" \ ^ 100.0 \)  \ + OR \ + \(name_text \:\"衬衫\" \ ^ 100.0 \)\)"&q = {!boost}(%2B {!lucene + v%3D $ yq})&fq = currency_string:USD&fq =(  userpricegroup_string :(""))&fq =({!collapse + field%3Dspo_string + sort%3D" if(exists(priceOtc_usd_double),priceOtc_usd_double,priceRcFi  rst_usd_double)+ asc"}))&fq =(catalogId:" electronicsProductCatalog" + AND + catalogVersion:"在线")&sort = inStockFlag_boolean + desc,score + desc&start = 0&rows = 10&facet.field = Resolution,+ 80_string&facet.field = Colour + of  + product,+ 1766_string&facet.field =安装,+ 1867_string&facet.field = price_usd_string&facet.field = categoryPath_string_mv&facet.field = allPromotions_string_mv&facet.field =镜头+类型,+ 472_string_mv&facet.field = Megapixel,+ 63_string&facet.field = category。  = availableInStores_string_mv&facet = true&facet.sort = count&facet.mincount = 1&facet.limit = 50&fl = score,*&hl.fl = summary_text&hl.fl = name_text&hl = true&hl.snippets = 3&hl.requireFieldMatch = false&hl.method = preified&hltag。  + class%3D" search-results-highlight">&hl.tag.post = &spellcheck = true&spellcheck.q = Shirt&spellcheck.dictionary = zh-CN&spellcheck.collat​​e = true

  

这是我使用此solrQuery参数得到的响应:

  {
    " responseHeader":{
      "状态":0,
      " QTime":57,
      "参数":{
        " hl.tag.pre":" ",
        " facet.field":[" Resolution,80_string",
          "产品的颜色,1766_string",
          " 1867_string安装,"
          " price_usd_string",
          " categoryPath_string_mv",
          " allPromotions_string_mv",
          "镜头类型,472_string_mv",
          "百万像素,63_string",
          " category_string_mv",
          " brand_string_mv",
          " availableInStores_string_mv"],
        " spellcheck.dictionary":" en",
        " hl":" true",
        " fl":"得分,*",
        " hl.requireFieldMatch":" false",
        "开始":" 0",
        " fq":[" currency_string:USD",
          "(userpricegroup_string:(\" \"))",
          "({!collapse field = spo_string sort = \" if(exists(priceOtc_usd_double,priceOtc_usd_double,priceRcFirst_usd_double)asc \"})",
          "(catalogId:\" electronicsProductCatalog \" AND catalogVersion:\"在线\")"],
        " sort":" inStockFlag_boolean desc,score desc",
        " hl.tag.post":" ",
        " rows":" 10",
        " hl.snippets":" 3",
        " q":[" {!boost}({!lucene v = $ yq})",
          " {!boost}(+ {!lucene v = $ yq})"],
        " facet.limit":" 50",
        " spellcheck.q":"衬衫",
        " spellcheck":" true",
        " yq":" _ query _:\" \\ {\ !! multiMaxScore \\ tie = 0.0 \\} \\(\\(keywords_text \\:Shirt \\ ^ 20.0 \\)\\ OR \\ \\(  ManufacturerName_text \\:衬衫\\ ^ 40.0 \\)\\ OR \\ \\(description_text \\:衬衫\\ ^ 25.0 \\)\\ OR \\ \\(类别名称_text_mv \\:衬衫\\ ^ 20.0 \  \)\\ OR \\ \\(name_text \\:衬衫\\ ^ 50.0 \\)\\)\\ OR \\ \\(\\(code_string \\:衬衫\\ ~~ \\)\\ OR  \\ \\(keywords_text \\:衬衫\\ ~~ \ ^ 10.0 \\)\\ OR \\ \\(manufacturererName_text \\:衬衫\\ ~~ \ ^ 20.0 \\)\\ OR \\ \\\  (description_text \\:Shirt \\ ~~ \ ^ 10.0 \\)\\ OR \\ \\(categoryName_text_mv \\:Shirt \\〜\\ ^ 10.0 \\)\\ OR \\ \\(ean_string \\  :Shirt \\〜\\)\\ OR \\ \\(name_text \\:Shirt \\〜\\ ^ 25.0 \\))\\ OR \\ \\(\\((code_string \\ :: \  \\"衬衫\\\" \\ ^ 90.0 \\)\\ OR \\ \\(关键字文本\\:\\\"衬衫\\\" \\ ^ 40.0 \\)\\ OR \\ \\  (manufacturerName_text \\:\\\" Shirt \\\" \\ ^ 80.0 \\)\\ OR \\ \\(description_text \\ :: \\\" Shirt \\\" \\ ^ 50.0 \\)\\  \ OR \\ \\(categoryName_text_mv \\ :: \\\" Shirt \\\" \\ ^ 40.0 \\)\\ OR \\ \\(ean_string \\:\\\" Shirt \\\\" \\  ^ 100.0 \\)\\ OR \\ \\(name_text \\ :: \\\" Shirt \\\" \\ ^ 100.0 \\)\\)\"",
        " facet.mincount":" 1",
        " hl.fl":[" summary_text",
          " name_text"],
        " hl.method":"统一",
        " facet":" true",
        " facet.sort":" count",
        " spellcheck.collat​​e":" true"}},
    " response":{" numFound":0," start":0," maxScore":0.0," docs":[]
    },
    " facet_counts":{
      " facet_queries":{},
      " facet_fields":{
        " Resolution,80_string":[],
        "产品颜色,1766_string":[],
        "安装,1867_string":[],
        " price_usd_string":[],
        " categoryPath_string_mv":[],
        " allPromotions_string_mv":[],
        "镜头类型,472_string_mv":[],
        "百万像素,63_string":[],
        " category_string_mv":[],
        " brand_string_mv":[],
        " availableInStores_string_mv":[]},
      " facet_ranges":{},
      " facet_intervals":{},
      " facet_heatmaps":{}},
    "突出显示":{},
    "拼写检查":{
      "建议":[
        "衬衫",{
          " numFound":1,
          " startOffset":0,
          " endOffset":5,
          " suggestion":[" shot"]}],
      "归类":[
        "整理","拍摄"]}}
  
3条回答
太Q了
2020-09-09 09:42

很难说为什么结果中没有产品。 我建议直接在solr服务器上执行此查询,并尝试逐步解决问题,以消除查询/URL中的条件。

例如,如果所有产品的" currency_string"字段为空,则不会返回任何内容。

一周热门 更多>