2

BDC model:
My BDC model's entity has a property named Color. The TypeName is specified as System.String[].

<TypeDescriptor Name="Color" TypeName="System.String[]">
  <Properties>
    <Property Name="RequiredInForms" Type="System.Boolean">false</Property>
  </Properties>
</TypeDescriptor>

Database:
In my database (my BDC content source) I added column values like this one:

;#Blue;#Green;#Yellow;#

Search Schema
I created a new managed property and enabled multiple values (and also refinable - active, queryable, retrievable, safe).

Search Results
Filtering on a specific color via search works. Example: RsExpAdvWorksProductColor:"blue"

Search Refinement
However I cannot refine on colors. Adding a refiner on my Managed Property shows up like that:

Color
;#Blue;#Green;#Yellow;#  
;#Green;#Yellow;#  
;#Red;#Green;#Yellow;#Blue;#Black;#Cyan;#

Obviously the single values are not treated as such - the whole "string" of "special-delimiter" separated values is being shown as a refinment criteria.

Any hints?

Update 2015-03-20: I took a closer look at the built-in multi choice columns. In search results they are being returned as "Value1;#Value2;#" and so on. Basically there is a trailing Red;#Blue;# separator - no leading ;#Red;#Blue;# one. Much to my regret that didn't solve my problem.

lapsus
  • 2,915
  • 2
  • 32
  • 61
  • How have you been able to get it working with TypeName="System.String[]"? All I'm getting is `Error while crawling LOB contents. Error caused by exception: System.InvalidOperationException There is an error in XML document` when I try to use a collection property. – Szybki Jan 23 '19 at 00:20

1 Answers1

1

Update 2015-03-20: Surprise surprise. It is in fact "working as designed" (like so many things in SharePoint :P). What I am looking for has to be dealt with separately. It behaves exactly the same with built-in multi choice fields so there is nothing wrong with my BDC/Search integration.

Regarding the refiner, have a look at the following links...

lapsus
  • 2,915
  • 2
  • 32
  • 61