<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:17:26 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-8436] Aggregation pipeline cannot process system.profile doc fields with $ prefixes</title>
                <link>https://jira.mongodb.org/browse/SERVER-8436</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Due to strict FieldPath validation, aggregation pipelines cannot process fields that start with a &lt;tt&gt;$&lt;/tt&gt; character (commonly found in the &lt;tt&gt;system.profile&lt;/tt&gt; collection).&lt;/p&gt;

&lt;p&gt;Steps to reproduce (copied here so code formatting works):&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.system.profile.drop();&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.setProfilingLevel(2);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.foo.update({},{$set:{x:1}})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.setProfilingLevel(0);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.system.profile.aggregate([&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;  { &quot;$match&quot; : {&quot;op&quot; : &quot;update&quot;}},&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;  { &quot;$project&quot; : {&quot;set&quot; : &quot;$updateobj.$set&quot;}}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;]);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Exception:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;  &quot;errmsg&quot; : &quot;exception: FieldPath field names may not start with &apos;$&apos;.&quot;,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;  &quot;code&quot; : 16410,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;  &quot;ok&quot; : 0&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="64043">SERVER-8436</key>
            <summary>Aggregation pipeline cannot process system.profile doc fields with $ prefixes</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                            <label>query-44-grooming</label>
                            <label>usability</label>
                    </labels>
                <created>Fri, 1 Feb 2013 16:39:56 +0000</created>
                <updated>Tue, 6 Dec 2022 05:25:14 +0000</updated>
                                            <version>2.3.2</version>
                                                    <component>Aggregation Framework</component>
                                        <votes>3</votes>
                                    <watches>14</watches>
                                                                                                                <comments>
                            <comment id="1640982" author="asya" created="Fri, 4 Aug 2017 17:28:36 +0000"  >&lt;p&gt;Starting with 3.4.4 it&apos;s possible to work around this limitation in aggregation language with new $objectToArray and $arrayToObject expressions.&lt;/p&gt;

&lt;p&gt;There are examples of such syntax in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-30365?focusedCommentId=1633832&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1633832&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt; and also &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14466?focusedCommentId=1598429&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1598429&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="381390" author="craiggwilson" created="Mon, 15 Jul 2013 16:45:31 +0000"  >&lt;p&gt;That&apos;s very interesting.  It seems like the crux of the problem here is that you are doing an upsert and the server is adding in fields meant to constrain (MLSStatus, ListPrice, _keywords) because if thinks they are supposed to be in the document.  You need to be providing default values for things like MLSStatus in the update document in order for them to be written appropriately.  For instance, what is the ListPrice for the document if it ends up getting inserted? What is the MLSStatus if the document is inserted? In server 2.4, we added the $setOnInsert update operator that allows you to provide default values for these.  Unfortunately, server 2.3.2 doesn&apos;t have this support.&lt;/p&gt;

&lt;p&gt;My suggestion to you is to not do an upsert here and instead get back 0 documents.  When this happens, you&apos;ll need to do an insert manually and then proceed on as you were before.&lt;/p&gt;</comment>
                            <comment id="381369" author="jcole@solidearth.com" created="Mon, 15 Jul 2013 16:14:31 +0000"  >&lt;p&gt;Here is the resulting object from the database:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;_id&quot; : ObjectId(&quot;51e4103b4201001cb146d71b&quot;),&lt;br/&gt;
    &quot;form&quot; : &lt;/p&gt;
{
        &quot;ListPriceMinVal&quot; : 172000,
        &quot;ListPriceMaxVal&quot; : 182900,
        &quot;BathsTotalMinVal&quot; : 0,
        &quot;BedsTotalMinVal&quot; : 0,
        &quot;Location&quot; : &quot;foobar2&quot;
    }
&lt;p&gt;,&lt;br/&gt;
    &quot;hits&quot; : 1,&lt;br/&gt;
    &quot;query&quot; : {&lt;br/&gt;
        &quot;sys&quot; : &quot;gcar&quot;,&lt;br/&gt;
        &quot;MLSStatus&quot; : &lt;/p&gt;
{
            &quot;$in&quot; : [ 
                &quot;Active&quot;
            ]
        }
&lt;p&gt;,&lt;br/&gt;
        &quot;hide&quot; : &lt;/p&gt;
{
            &quot;$nin&quot; : [ 
                1
            ]
        }
&lt;p&gt;,&lt;br/&gt;
        &quot;OfficeExclusive&quot; : &lt;/p&gt;
{
            &quot;$nin&quot; : [ 
                1
            ]
        }
&lt;p&gt;,&lt;br/&gt;
        &quot;ListPrice&quot; : &lt;/p&gt;
{
            &quot;$gte&quot; : 172000,
            &quot;$lte&quot; : 182900
        }
&lt;p&gt;,&lt;br/&gt;
        &quot;_keywords&quot; : &lt;/p&gt;
{
            &quot;$all&quot; : [ 
                &quot;foobar2&quot;
            ]
        }
&lt;p&gt;,&lt;br/&gt;
        &quot;hideaddress&quot; : &lt;/p&gt;
{
            &quot;$ne&quot; : 1
        }
&lt;p&gt;    },&lt;br/&gt;
    &quot;ts&quot; : ISODate(&quot;2013-07-15T15:05:38Z&quot;)&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="381322" author="craiggwilson" created="Mon, 15 Jul 2013 15:35:58 +0000"  >&lt;p&gt;&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;.  Nope, no bug, and nothing wrong on your end.  You are simply using the dollar operators, not using field names beginning with a dollar sign.   A field name beginning with a dollar sign would be like $ListPriceMinVal instead of ListPriceMinVal.&lt;/p&gt;

&lt;p&gt;This is definitely a server issue in regards to the system.profile collection.  To query this, you likely need to read out of the profile collection, sanitize the dollars signs to something else and then save them to another collection.&lt;/p&gt;

&lt;p&gt;MongoDefaults is a static class where you can do some overriding.  You can also change some of the settings at the client, database, or collection level by using MongoClientSettings, MongoDatabaseSettings, or MongoCollectionSettings respectively.&lt;/p&gt;</comment>
                            <comment id="381307" author="jcole@solidearth.com" created="Mon, 15 Jul 2013 15:24:00 +0000"  >&lt;p&gt;How can we override the defaults, that might come in handy.  We aren&apos;t doing anything special, just using FindAndModify.&lt;/p&gt;

&lt;p&gt;Here is the code that performs the upsert:&lt;/p&gt;

&lt;p&gt;return Collection.FindAndModify(query, sortBy, update, returnNew, upsert);&lt;/p&gt;

&lt;p&gt;Collection is a private property:&lt;/p&gt;

&lt;p&gt;private MongoCollection&amp;lt;T&amp;gt; Collection&lt;br/&gt;
        {&lt;br/&gt;
            get&lt;/p&gt;
            {
                return MongoDatabase.Create(_dburl).GetCollection&amp;lt;T&amp;gt;(_collection_name);
            }
&lt;p&gt;        }&lt;/p&gt;

&lt;p&gt;query = { &quot;query&quot; : { &quot;sys&quot; : &quot;gcar&quot;, &quot;MLSStatus&quot; : &lt;/p&gt;
{ &quot;$in&quot; : [&quot;Active&quot;] }
&lt;p&gt;, &quot;hide&quot; : &lt;/p&gt;
{ &quot;$nin&quot; : [1] }
&lt;p&gt;, &quot;OfficeExclusive&quot; : &lt;/p&gt;
{ &quot;$nin&quot; : [1] }
&lt;p&gt;, &quot;ListPrice&quot; : &lt;/p&gt;
{ &quot;$gte&quot; : 172000, &quot;$lte&quot; : 182900 }
&lt;p&gt;, &quot;_keywords&quot; : &lt;/p&gt;
{ &quot;$all&quot; : [&quot;foobar2&quot;] }
&lt;p&gt;, &quot;hideaddress&quot; : &lt;/p&gt;
{ &quot;$ne&quot; : 1 }
&lt;p&gt; } }&lt;/p&gt;

&lt;p&gt;and update = { &quot;$set&quot; : { &quot;form&quot; : &lt;/p&gt;
{ &quot;ListPriceMinVal&quot; : 172000, &quot;ListPriceMaxVal&quot; : 182900, &quot;BathsTotalMinVal&quot; : 0, &quot;BedsTotalMinVal&quot; : 0, &quot;Location&quot; : &quot;foobar2&quot; }
&lt;p&gt;, &quot;hits&quot; : 1, &quot;ts&quot; : ISODate(&quot;2013-07-15T15:05:38.211Z&quot;) } }&lt;/p&gt;

&lt;p&gt;upsert = true&lt;/p&gt;

&lt;p&gt;sortBy = null&lt;/p&gt;

&lt;p&gt;_dburl in development is mongodb://localhost/sprint1309?w=1&lt;/p&gt;


&lt;p&gt;T for this object is:&lt;/p&gt;

&lt;p&gt;public class SearchLog&lt;br/&gt;
    {&lt;br/&gt;
        public ObjectId _id &lt;/p&gt;
{ get; set; }&lt;br/&gt;
&lt;br/&gt;
        public BsonDocument query { get; set; }
&lt;p&gt;        public QuickSearch form &lt;/p&gt;
{ get; set; }&lt;br/&gt;
        public DateTime ts { get; set; }
&lt;p&gt;        public int hits &lt;/p&gt;
{ get; set; }
&lt;p&gt;    }&lt;/p&gt;

&lt;p&gt;c# driver 1.8.0&lt;br/&gt;
MongoDb 2.4.3 on windows &amp;amp; ubuntu 12&lt;/p&gt;

&lt;p&gt;As I mentioned, this works very well for us and we like it, we just can&apos;t use an agg pipeline on it.  And while it doesn&apos;t address the OP about using agg pipelines against system.profile (which we patterned our query storage collection after), it would be nice to have a suggestion to how we should store query documents in a document.&lt;/p&gt;

&lt;p&gt;If it&apos;s a bug, please don&apos;t &quot;fix&quot; it quickly.  We will need time to find another way to store queries.&lt;/p&gt;</comment>
                            <comment id="381263" author="craiggwilson" created="Mon, 15 Jul 2013 14:26:15 +0000"  >&lt;p&gt;John,&lt;br/&gt;
  Could you provide an example of a document you are saving with the driver as well as how you are saving it?  By default, we disallow this, so either you have disabled the defaults or we have a bug/oversight.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;br/&gt;
Craig&lt;/p&gt;</comment>
                            <comment id="378963" author="jcole@solidearth.com" created="Thu, 11 Jul 2013 15:28:02 +0000"  >&lt;p&gt;Dan,&lt;br/&gt;
  We are having the same issue as the OP, we cannot use a agg framework pipeline on one of our collections due to those documents having field names that start with &apos;$&apos;.&lt;/p&gt;

&lt;p&gt;  We understand that having field names starting with &apos;$&apos; is not supposed to be allowed, but because it currently is possible with 2.4.3 and the C# 1.8.0 driver, we have been doing this, and everything except aggregation framework has worked fine.  Even matching against fields starting with &apos;$&apos; currently works.&lt;/p&gt;

&lt;p&gt;  Because of the problems brought up with the OP, we are looking at what it will take to escape our saved queries so fields do not start with a &apos;$&apos;, and we expect this to address our issue running a aggregation pipeline against collections with field names starting with &apos;$&apos;.&lt;/p&gt;

&lt;p&gt;  However, this will not address the OP issue, which we have also run into, of running a agg pipeline against the system.profile collection.  To address this, allowing the $Project operator to work on fields starting with &apos;$&apos; would be a nice way of allowing agg pipelines to work with the system.profile collection.  It would also work if the system.profile collection escaped the fields staring with &apos;$&apos;, as we are going to have to do on our collections in the future.&lt;/p&gt;

&lt;p&gt;J&lt;/p&gt;

</comment>
                            <comment id="378897" author="dan@10gen.com" created="Thu, 11 Jul 2013 14:27:53 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jcole%40solidearth.com&quot; class=&quot;user-hover&quot; rel=&quot;jcole@solidearth.com&quot;&gt;jcole@solidearth.com&lt;/a&gt;, from your first comment I understood you were saying that you are inserting fields starting with &apos;$&apos; directly, but it appears you are just repeating the description of the issue as reported by &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jmikola%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;jmikola@gmail.com&quot;&gt;jmikola@gmail.com&lt;/a&gt; that you cannot run aggregations on the profiling data.&lt;/p&gt;

&lt;p&gt;This constraint cannot be relaxed as the &apos;$&apos; is reserved for operators.  For the moment the only workaround I know of is to pull the data out and transform it client side.&lt;/p&gt;
</comment>
                            <comment id="378105" author="woaksie" created="Wed, 10 Jul 2013 16:14:49 +0000"  >&lt;p&gt;The problem is that the profile data Mongo stores in the system.profile collection does have fields with names that start with $ because they are storing commands that have been executed and some of them start with a $. For example $exists looks like &quot;query&quot; : { &quot;somefield&quot; : &lt;/p&gt;
{ &quot;$exists&quot; : true }
&lt;p&gt; } in the profile collection. The aggregation pipeline cannot process this entry.&lt;/p&gt;</comment>
                            <comment id="377982" author="jcole@solidearth.com" created="Wed, 10 Jul 2013 13:25:52 +0000"  >&lt;p&gt;Were using the C# 1.8.0 driver.  We are storing search queries for our saved search and collections features, and mimicking the system.profile seemed like a good idea as it allowed us to quickly save and recover a query.&lt;/p&gt;

&lt;p&gt;What is 10gen&apos;s suggested method for storing queries in a document?&lt;/p&gt;</comment>
                            <comment id="377770" author="dan@10gen.com" created="Wed, 10 Jul 2013 04:21:34 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jcole%40solidearth.com&quot; class=&quot;user-hover&quot; rel=&quot;jcole@solidearth.com&quot;&gt;jcole@solidearth.com&lt;/a&gt;, you shouldn&apos;t normally be able to store a field name starting with a &apos;$&apos; from most drivers.&lt;/p&gt;</comment>
                            <comment id="377424" author="jcole@solidearth.com" created="Tue, 9 Jul 2013 20:29:55 +0000"  >&lt;p&gt;With 2.4.3 you can save a subfield starting with a $.  For example:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;_id&quot; : ObjectId(&quot;51c0f5d3972f5131399032e8&quot;),&lt;br/&gt;
    &quot;query&quot; : {&lt;br/&gt;
        &quot;_keywords&quot; : &lt;/p&gt;
{
            &quot;$all&quot; : [ 
                &quot;birmingham&quot;
            ]
        }
&lt;p&gt;    }&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;However you cannot process this in the aggregation framework. The related issue was fixed in 2.2.0-rc1 so this seems to be valid currently.&lt;/p&gt;

&lt;p&gt;We are storing our query documents and would like to run statistics on them, but because the Field Path check is failing.&lt;/p&gt;

&lt;p&gt;As a minimum, it would be nice if the $project task allowed you to rename a column so it could be used by the rest of the pipeline.&lt;/p&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="128779">SERVER-13436</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="22782">SERVER-3943</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="142157">SERVER-14255</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="408955">SERVER-30365</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="145534">SERVER-14466</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="414602">SERVER-30575</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="45366">SERVER-6592</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>12.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[500A000000UaVcuIAF, 5002K00000sbfHWQAY]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 9 Jul 2013 20:29:55 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 27 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-878</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 27 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>craig.wilson@mongodb.com</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>jmikola@mongodb.com</customfieldvalue>
            <customfieldvalue>jcole@solidearth.com</customfieldvalue>
            <customfieldvalue>woaksie</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrn8hz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2bwv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7032</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrj8yv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>