Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Dynamic index - Passing parameters to inherited AbstractIndexCreationTask object
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John  
View profile  
 More options May 7 2012, 12:36 pm
From: John <jbritt...@gmail.com>
Date: Mon, 7 May 2012 09:36:44 -0700 (PDT)
Local: Mon, May 7 2012 12:36 pm
Subject: Dynamic index - Passing parameters to inherited AbstractIndexCreationTask object
How will I pass parameters into this object so that I wanted to build
the "maps" string dynamically based on the paramters.

   public class RavenDynamicIndex: AbstractIndexCreationTask
    {

        public RavenDynamicIndex()
        {

        }

        public override IndexDefinition CreateIndexDefinition()
        {

            var maps = new HashSet<string>();

             maps.Add(@"docs.Rolls.SelectMany(x => (x.RollIndexList),
(x, d) => new {DocumentType = d.Index.DocumentType})");

            return new IndexDefinition
            {
                Name = "TestingDynamicIndex",
                Maps = maps,
                Reduce = "results.GroupBy(r => new {DocumentType =
r.DocumentType}).Select(g => new {DocumentType =
g.Key.DocumentType})"
            };
        }
    }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options May 7 2012, 12:54 pm
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Mon, 7 May 2012 19:54:36 +0300
Local: Mon, May 7 2012 12:54 pm
Subject: Re: [RavenDB] Dynamic index - Passing parameters to inherited AbstractIndexCreationTask object

A constructor parameter? I am not sure that I am following what you mean
here.
Note that if you are building indexes like that, you might as well just
skip the AbstractIndexCreationTask


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »