Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Index for string[] . #116

Closed
xiaoyc opened this issue Jul 2, 2018 · 2 comments
Closed

Create Index for string[] . #116

xiaoyc opened this issue Jul 2, 2018 · 2 comments

Comments

@xiaoyc
Copy link

xiaoyc commented Jul 2, 2018

For the sample YesSql.Samples.Hi , if i want to create an index for Tags to query blog posts.

public class BlogPost
    {
        public string Title { get; set; }
        public string Author { get; set; }
        public string Content { get; set; }
        public DateTime PublishedUtc { get; set; }
        public string[] Tags { get; set; }
    }

   context.For<BlogPostByTag>()
                .Map(blogpost =>
                      new BlogPostByTag { Tags = blogpost.Tags} ?????
                );


how should i set the IndexProvider ?

Thanks very much .

@sebastienros
Copy link
Owner

You can return a list of BlogPostByTag, which will create a record per tag.

@lnaie
Copy link

lnaie commented Apr 20, 2022

Showcased in this PR: #439

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants