Reputation: 969
I have a solr dynamic field with a space “myfield name_solr” . Does anyone know how to use this field in the field list query . I have tried to substitute the space “myfield\ name_solr” which gives me empty resukys without any error . I’m suing solr 7.x
Upvotes: 0
Views: 834
Reputation: 163
You can use "\ "
(backslash followed by a space) like attribute_Brand\ Name:Abc
in the query string or the filtered query field.
Upvotes: 0
Reputation: 9789
Spaces in field names are bad. You should not be creating those manually.
However, It seems that this field name is coming from the internal system during indexing and is creating automatically. In which case, you should substitute the space in the actual field name during indexing, using Update Request Processor and FieldNameMutatingUpdateProcessorFactory, which can substitute spaces with dashes.
In fact, if you use schemaless mode, it should have happened already. I am unsure how exactly this field name got created, but the solution is still the same as above.
Upvotes: 1