Include custom type to UnifiedSearch result

Vote:
 

Good morning,

We are indexing some external data (created additional job for this).

var Client = ServiceLocator.Current.GetInstance();
var item = new TestItem { Id = 11, Text = "Some text value", Heading = "Heading"};
ClientExtensions.Index(Client, item);

1. What should we do to get this object as a result from UnifiedSearchFor operation?

I get only episerver content in the next request.

var result = ClientExtensions.UnifiedSearchFor(Client, "text").GetResult();

2. How can we configure what data will be present in the 'Title', 'ImageUrl'...?

3. How can we set boosting weights to our fields? 

It works when we using 'Explore' tab from EPiServer Find (http://localhost/EPiServer/Find/#overview/explore)

I hope you guys can help us to resolve this.

Best regards,

Pavel

#141275
Nov 11, 2015 7:09
Vote:
 

Custom object should has 'SearchText' property

            var client = ServiceLocator.Current.GetInstance<IClient>();

            client.Conventions.UnifiedSearchRegistry.Add<TestItem>();
            client.Conventions.ForInstancesOf<TestItem>()
                .IdIs(p => p.Id)
                .IncludeField(p => p.Name())
                .IncludeField(p => p.SearchText());
#141635
Nov 17, 2015 9:03
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.