Try our conversational search powered by Generative AI!

FindSearchProvider - Exception when searching if adding a decimal property in content type

Fixed in

EPiServer.Find.Commerce 9.5.0

(Or a related package)

Created

Dec 28, 2015

Updated

Mar 04, 2016

Area

Find

State

Closed, Fixed and tested


Description

Steps to reproduce

  1. Add following code to any catalog entry content class to create a new property
    [Display(Name = "Decimal Property")]
    [Searchable]
    [Tokenize]
    [IncludeInDefaultSearch]
    public virtual decimal Decimal_Property { get; set; }
  2. Build the site project
  3. Add data for the new property
  4. In Commerce Manager, re-build index
  5. Search by name of a catalog entry
    Expected: Catalog entry name is available in search result
    Actual: Not found when searching in front-end site and server error on the back-end.
    Exception in the both sites are the same.

2015-12-28 15:35:06,955 [465] ERROR Mediachase.Search.SearchManager: Search failed.
EPiServer.Find.ServiceException: The remote server returned an error: (400) Bad Request.
SearchPhaseExecutionException[Failed to execute phase [query], all shards failed; shardFailures {[qOehlxZoRfeebypVI5fsYw][dungepi_seagull1][1]: SearchParseException[[dungepi_seagull1][1]: from[-1],size[10]: Parse Failure [Failed to parse source [{"size":10,"query":{"filtered":{"query":{"filtered":{"query":{"query_string":{"fields":["Name$$string.standard","CatalogEntryCode$$string.standard","DoubleFields.decimal_property_nolang$$number","IntFields.integer_property_nolang$$number","StringFields.displayname_en$$string.standard"],"query":"tops"}},"filter":{"and":[{"or":[{"range":{"StartDate$$date":

{"from":"0001-01-01T00:00:00Z","to":"9999-12-31T16:59:59.9999999Z","include_lower":true,"include_upper":false}

}},{"term":{"StartDate$$date":"9999-12-31T16:59:59.9999999Z"}},{"and":[{"term":{"AllowPreorder$$bool":true}},{"or":[{"range":{"PreorderAvailableDate$$date":

{"from":"0001-01-01T00:00:00Z","to":"9999-12-31T16:59:59.9999999Z","include_lower":true,"include_upper":false}

}},{"term":{"PreorderAvailableDate$$date":"9999-12-31T16:59:59.9999999Z"}}]}]}]},{"or":[{"range":{"EndDate$$date":

{"from":"0001-01-01T00:00:00Z","to":"9999-12-31T16:59:59.9999999Z","include_lower":false,"include_upper":true}

}},{"term":{"EndDate$$date":"0001-01-01T00:00:00Z"}}]},{"term":{"Catalogs.lowercase":"departmental catalog"}}]}}},"filter":{"term":{"___types":"EPiServer.Commerce.FindSearchProvider.FindDocument"}}}},"facets":{"Facet_Brand brand 1":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 1"}

}},"Facet_Brand brand 2":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 2"}

}},"Facet_Brand brand 3":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 3"}

}},"Facet_Brand brand 4":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 4"}

}},"Facet_Brand brand 5":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 5"}

}}}}]]]; nested: NumberFormatException[For input string: "tops"]; }{[NFpxBi1IQjSGa3CXwAOMxg][dungepi_seagull1][0]: RemoteTransportException[[euw1afinddev01esd04][inet[/10.54.3.204:9300]][search/phase/query]]; nested: SearchParseException[[dungepi_seagull1][0]: from[-1],size[10]: Parse Failure [Failed to parse source [{"size":10,"query":{"filtered":{"query":{"filtered":{"query":{"query_string":{"fields":["Name$$string.standard","CatalogEntryCode$$string.standard","DoubleFields.decimal_property_nolang$$number","IntFields.integer_property_nolang$$number","StringFields.displayname_en$$string.standard"],"query":"tops"}},"filter":{"and":[{"or":[{"range":{"StartDate$$date":

{"from":"0001-01-01T00:00:00Z","to":"9999-12-31T16:59:59.9999999Z","include_lower":true,"include_upper":false}

}},{"term":{"StartDate$$date":"9999-12-31T16:59:59.9999999Z"}},{"and":[{"term":{"AllowPreorder$$bool":true}},{"or":[{"range":{"PreorderAvailableDate$$date":

{"from":"0001-01-01T00:00:00Z","to":"9999-12-31T16:59:59.9999999Z","include_lower":true,"include_upper":false}

}},{"term":{"PreorderAvailableDate$$date":"9999-12-31T16:59:59.9999999Z"}}]}]}]},{"or":[{"range":{"EndDate$$date":

{"from":"0001-01-01T00:00:00Z","to":"9999-12-31T16:59:59.9999999Z","include_lower":false,"include_upper":true}

}},{"term":{"EndDate$$date":"0001-01-01T00:00:00Z"}}]},{"term":{"Catalogs.lowercase":"departmental catalog"}}]}}},"filter":{"term":{"___types":"EPiServer.Commerce.FindSearchProvider.FindDocument"}}}},"facets":{"Facet_Brand brand 1":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 1"}

}},"Facet_Brand brand 2":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 2"}

}},"Facet_Brand brand 3":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 3"}

}},"Facet_Brand brand 4":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 4"}

}},"Facet_Brand brand 5":{"filter":{"term":

{"StringFields.facet_brand_nolang$$string.lowercase":"brand 5"}

}}}}]]]; nested: NumberFormatException[For input string: "tops"]; }] ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.