November Happy Hour will be moved to Thursday December 5th.

How to use Take() when searching over multiple types.

Vote:
 

Hi I'm writing the code as below to get the results.

ITypeSearch<ImageVaultNonDoc> query = client.Search<ImageVaultNonDoc>()
                    .For(Query)
                    .WithAndAsDefaultOperator();
    
var results = query.Select(x2 => new ImageVaultFiles
                {
                    Id = x2.Id,
                    Name = x2.Name,
                    ButoURL = x2.ButoURL,
                    PortalTitle = x2.PortalTitle,
                    AlbumId = x2.AlbumId
                })
                    .IncludeType<ImageVaultFiles, ImageVaultDoc>(x1 => new ImageVaultFiles
                    {
                        Id = x1.Id,
                        Name = x1.Name,
                        ButoURL = x1.ButoURL,
                        PortalTitle = x1.PortalTitle,
                        AlbumId = x1.AlbumId
                    })
                    .Track()
                    .GetResult()

ImageVaultDoc and ImageVaultNonDoc are the classes used while Indexing the content in ImageVault Server.

I'm able to get the results but I want to limit the results with Take() method.

I want to get 20 results from ImageVaultDoc and 10 Results from ImageVaultNonDoc.

Please suggest any Ideas that will help us.

Thanks.
#74495
Aug 29, 2013 16:33
Vote:
 

Hi that is not possible to do. If that is what you are looking for you will need to do to queries.

 

/Marcus

#74513
Aug 30, 2013 9:44
Vote:
 

Hi Marcus

Thanks for the reply .

did you mean to use different queries and different search clients?

#74520
Aug 30, 2013 10:55
Vote:
 

Hi Marcus ,

Is there any chance to Implement the same kind of Take() in Unified Search ?

Thanks

#74530
Aug 30, 2013 13:06
* 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.