Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all articles
Browse latest Browse all 9642

reaching max depth on json with simple searches.

$
0
0

Hi all, i'm troubleshooting an scenario that happens only when I'm looking for straight numbers (treated always as strings).

Looks like my searh elements are getting nested somehow and when try to have the json query, I'm getting EPiServer.Find.MaxSerializationDepthExceededException

The following query is being created as per the next code.

            var searchResultList =  searchRequests.Select(x => new Tuple<SearchRequestBody, Action<SearchCommand>>(x.Item1.RequestBody, x.Item1.CommandAction));
            List<SearchResults<JObject>> list = multiSearch.Client.MultiSearch<JObject>(searchResultList, null).ToList<SearchResults<JObject>>();

here is the big nested json as result, the one who raises the expection above. 

It only happens with certain numeric codes, not with non existen words or numbers or anything else.

"size":5,"query":{"filtered":{"query":{"filtered":{"query":{"function_score":{"query":{"custom_filters_score":{"query":{"filtered":{"query":{"bool":{"should":[
                                          {"bool":{"should":[
                                                   {"bool":{"should":[
                                                            {"bool":{"should":[
                                                                     {"bool":{"should":[
                                                                              {"query_string":{"fields":["_all"
                                                                                    ],"query":701200522,"analyzer":"synonym"
                                                                                 }
                                                                              },
                                                                              {"constant_score":{"filter":{"or":[
                                                                                          {"ids":null
                                                                                          }
                                                                                       ]
                                                                                    }
                                                                                 }
                                                                              }
                                                                           ]
                                                                        }
                                                                     }
                                                                  ]
                                                               }
                                                            }
                                                         ]
                                                      }
                                                   }
                                                ]
                                             }
                                          }
                                       ]
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
}

Viewing all articles
Browse latest Browse all 9642

Trending Articles