You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query_options[:filter_queries] = replace_types([*options[:facets][:browse]].collect{|k| "#{k.sub!(/ *: */,"_facet:")}"}) if options[:facets][:browse]
Why is it k.sub! and not k.gsub! ? Wouldn't we want to replace ALL occurrences of the property names in the string?
If I have an fq of "(property_x:1 OR property_y:1)" then the above code will result in:
"(property_x_facet:1 OR property_y:1)"
What I really want in the end is:
"(property_x_facet:1 OR property_y_facet:1)"
Same question about the line that parses [:facets][:queries]:
query_options[:facets][:queries] = replace_types(options[:facets][:query].collect{|k| "#{k.gsub!(/ *: */,"_t:")}"}) if options[:facets][:query]
The text was updated successfully, but these errors were encountered:
In this line of ParserMethods.parse_query:
query_options[:filter_queries] = replace_types([*options[:facets][:browse]].collect{|k| "#{k.sub!(/ *: */,"_facet:")}"}) if options[:facets][:browse]
Why is it k.sub! and not k.gsub! ? Wouldn't we want to replace ALL occurrences of the property names in the string?
If I have an fq of "(property_x:1 OR property_y:1)" then the above code will result in:
"(property_x_facet:1 OR property_y:1)"
What I really want in the end is:
"(property_x_facet:1 OR property_y_facet:1)"
Same question about the line that parses [:facets][:queries]:
query_options[:facets][:queries] = replace_types(options[:facets][:query].collect{|k| "#{k.gsub!(/ *: */,"_t:")}"}) if options[:facets][:query]
The text was updated successfully, but these errors were encountered: