﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>And it would be better to have this discussion in the mailing list
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment33</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment33</guid><pubDate>Sun, 31 Oct 2010 13:32:07 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>BrightSoul, 
  
Use LuceneQuery(of Object) for now, it should respect the JObject / dynamic, but it doesn't at the moment.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment32</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment32</guid><pubDate>Sun, 31 Oct 2010 13:31:46 GMT</pubDate></item><item><title>BrightSoul commented on Raven’s dynamic queries</title><description>Thanks, Ayende, for such a quick response!
  
I still don't get it thought, hehe :D Sorry to bother you... I think I need a line of code to understand.
  
  
LuceneQuery is generic method, so I still have to provide a type, which I can't do. Assuming I have to retrieve all the Orders from Italy, I would do the following:
  
  
session.Advanced.LuceneQuery(Of Order)().Where("Country:Italy")
  
  
But "Order" is a type that doesn't exist in my application. The domain model is actually in another application I know nothing about.
  
  
Then, I gave it a shot trying JObject as the type.
  
  
session.Advanced.LuceneQuery(Of JObject)().Where("country:Italy")
  
  
But as expected, this query didn't return any result since I couldn't instruct it that my documents are inside docs.Orders. The following is the content of the temp index that's being created:
  
  
Temp/JObjects/ByCountry
  
from doc in docs.JObjects
  
select new { Country = doc.Country }
  
  
Correct me if I'm wrong but, the AbstractIndexCreationTask
  
is generating the frament "docs.JObjects" looking at the Type name, pluralized.
  
What I need here is the ability to use a string (ie. "docs.Orders"), not a type, to instruct the index creator where my documents exactly are.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment31</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment31</guid><pubDate>Sun, 31 Oct 2010 13:29:02 GMT</pubDate></item><item><title>BrightSoul commented on Raven’s dynamic queries</title><description>uhm, angled brackets are not htmlencoded... just to clarify on my previous comment, I meant IRavenQueryable(Of JObject) as the return type of the DatabaseCommands.Query overload; and session.Query(Of Type) as the method I can't use.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment30</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment30</guid><pubDate>Sun, 31 Oct 2010 12:17:16 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>BirghtSoul,
  
You can use Advanced.LuceneQuery to do so
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment29</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment29</guid><pubDate>Sun, 31 Oct 2010 12:16:03 GMT</pubDate></item><item><title>BrightSoul commented on Raven’s dynamic queries</title><description>Hello, this is awesome stuff, but can I leverage dynamic queries If I don't have server-side entities?
  
  
You see, I'm working with JObjects, storing and retrieving them with DatabaseCommands.Put and DatabaseCommands.Set.
  
  
session.Query
&lt;type() is not what I'm looking for since my asp.net application has no knowledge of "Type".
  
Then I found the method DatabaseCommands.Query but it's expecting an index name as one of its parameters. I want to avoid defining indexes upfront, if prossible. 
  
What I'd need is an overload of DatabaseCommands.Query that takes no parameters and returns an IRavenQueryable
&lt;jobject. That would allow me to do Linq queries using a fluent interface.
  
Is this possible? Thanks for your answers.
&gt;</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment28</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment28</guid><pubDate>Sun, 31 Oct 2010 12:07:14 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>scooletz ,
  
Yes, there are already there.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment27</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment27</guid><pubDate>Sat, 23 Oct 2010 17:48:04 GMT</pubDate></item><item><title>scooletz commented on Raven’s dynamic queries</title><description>Finally! Will you provide some kind of strategies, which can be used to configure Raven to determine a lifespan of a created temporary index?
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment26</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment26</guid><pubDate>Sat, 23 Oct 2010 16:05:18 GMT</pubDate></item><item><title>Steve Gentile commented on Raven’s dynamic queries</title><description>Great stuff Ayende - I really like seeing how Raven is maturing
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment25</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment25</guid><pubDate>Sat, 23 Oct 2010 01:03:19 GMT</pubDate></item><item><title>Peter Morris commented on Raven’s dynamic queries</title><description>That's what I suggested in the first place, why are you arguing with me? :-)
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment24</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment24</guid><pubDate>Wed, 20 Oct 2010 21:01:00 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Jakub,
  
Yes, you can do that using Lucene as well
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment23</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment23</guid><pubDate>Wed, 20 Oct 2010 20:57:45 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Peter,
  
We didn't take away indexes, they are still there.
  
We are simply giving the option to query without an index and have that done in an efficient manner.
  
  
As for querying without an index, you can do that too, with no index created. Not really useful, to tell you the truth, but you can
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment22</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment22</guid><pubDate>Wed, 20 Oct 2010 20:57:20 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Stevo,
  
Yes, there is the OEM licensing.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment21</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment21</guid><pubDate>Wed, 20 Oct 2010 20:55:57 GMT</pubDate></item><item><title>josh commented on Raven’s dynamic queries</title><description>This is the sort of improvement that will keep devs like me interested in the .Net world.
  
  
Nice Job, Oren &amp; Rob!
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment20</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment20</guid><pubDate>Wed, 20 Oct 2010 18:54:43 GMT</pubDate></item><item><title>Rob Ashton commented on Raven’s dynamic queries</title><description>Jakub - yes
  
  
You can even query collection properties like
  
  
Tags,Name:Fish
  
  
Where , denotes that Tags is a collection and Name is the property on the items in the collection you want to query
  
  
The only difference is that you include the full path to properties you want to query
  
  
User.Address.FirstLine
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment19</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment19</guid><pubDate>Wed, 20 Oct 2010 18:34:06 GMT</pubDate></item><item><title>Nick Aceves commented on Raven’s dynamic queries</title><description>This is probably Raven's single most awesome feature. And that's saying something, because Raven has a boatload of awesome features.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment18</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment18</guid><pubDate>Wed, 20 Oct 2010 17:00:28 GMT</pubDate></item><item><title>Jakub Borys commented on Raven’s dynamic queries</title><description>Will temporary indexes be created for Lucene queries as well?
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment17</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment17</guid><pubDate>Wed, 20 Oct 2010 16:39:05 GMT</pubDate></item><item><title>Rob Ashton commented on Raven’s dynamic queries</title><description>Peter - this functionality doesn't prevent people from defining indexes up front, the choice is entirely yours
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment16</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment16</guid><pubDate>Wed, 20 Oct 2010 16:11:29 GMT</pubDate></item><item><title>Peter Morris commented on Raven’s dynamic queries</title><description>I think you are missing my point.  If there is no index when the query runs then the user is already paying the price, when Raven then indexes the data in the background after the query has run the server pays the extra cost of generating an index that will not be used.
  
  
I just think it would be wise to *also* let people define indexes.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment15</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment15</guid><pubDate>Wed, 20 Oct 2010 15:58:23 GMT</pubDate></item><item><title>Stevo commented on Raven’s dynamic queries</title><description>Is there any plan on having some sort of royalty-free distribution license (commercial)?  Currently the lack of this keeps us from using the software.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment14</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment14</guid><pubDate>Wed, 20 Oct 2010 15:27:09 GMT</pubDate></item><item><title>Yitzchok commented on Raven’s dynamic queries</title><description>Wow this is very cool feature Oren. I think it will help people get into RavenDB much faster.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment13</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment13</guid><pubDate>Wed, 20 Oct 2010 15:14:33 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Peter,
  
Because with Raven, those things happen in the background.
  
You aren't paying for indexes.
  
In fact, one of RavenDB users has &gt; 500 users and millions of documents, without any ill effect.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment12</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment12</guid><pubDate>Wed, 20 Oct 2010 14:53:44 GMT</pubDate></item><item><title>Peter Morris commented on Raven’s dynamic queries</title><description>Here are the scenarios as I see them
  
  
A] Allowing a pre-defined index...
  
  
Inserts/updates/deletes on that table take a little longer, but the large infrequent query is very fast.
  
  
B] Not allowing a pre-defined index...
  
  
Inserts/updates/deletes on that table are a bit quicker, but the large infrequent query is much slower because it is running off unindexed data.  An index is also created in the background which will never be used.
  
  
Why I am wrong?
  
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment11</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment11</guid><pubDate>Wed, 20 Oct 2010 14:49:04 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Not really, no.
  
Work is done on the background, so you aren't really paying all that much for it.
  
Especially since in Raven, readers don't block the writer.
  
And you CAN do an effectively unidnexed query with Raven, if you want.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment10</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment10</guid><pubDate>Wed, 20 Oct 2010 14:44:08 GMT</pubDate></item><item><title>Richard Wilde commented on Raven’s dynamic queries</title><description>@Ayende - waiting for the "first page to be filled" answers my query. I understand the staleness versus fresh debate and have no problems with it
  
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment9</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment9</guid><pubDate>Wed, 20 Oct 2010 14:16:27 GMT</pubDate></item><item><title>Peter Morris commented on Raven’s dynamic queries</title><description>I'm not sure why you would think that.  If this query runs once per month and returns data from a table with millions of rows that match a specific criteria then it is going to have to read all rows to create the indexes and then select the data, this would be slower than just selecting without the index there at all; especially as the index will then be dropped before the query is run again next month.
  
  
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment8</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment8</guid><pubDate>Wed, 20 Oct 2010 14:13:14 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Peter,
  
Actually, no.
  
It is BETTER to make this a temporary index, because after a while, it gets cleared out, and doesn't takes resources.
  
And indexing is always done on the background, anyway.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment7</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment7</guid><pubDate>Wed, 20 Oct 2010 14:10:39 GMT</pubDate></item><item><title>Peter Morris commented on Raven’s dynamic queries</title><description>Oren: 
  
  
If this is a massive query that is run once per month for example as a payroll processing task then the app is really going to suffer isn't it?
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment6</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment6</guid><pubDate>Wed, 20 Oct 2010 14:08:09 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Peter,
  
1) Not really, no. We actually recommend using the dynamic indexes by default, and letting RavenDB do that for you. Defining indexes yourself if for more complex issues.
  
2) You are talking about sparse indexes, and that is an implementation detail for the DB. 
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment5</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment5</guid><pubDate>Wed, 20 Oct 2010 14:06:25 GMT</pubDate></item><item><title>Ayende Rahien commented on Raven’s dynamic queries</title><description>Richard,
  
That is the fun with RavenDB's stale-by-default.
  
Yes, it may take a while, but you know that because the answer is stale so you can either wait for it to be non stale or use the potentially stale results.
</description><link>http://ayende.com/4667/raven-s-dynamic-queries#comment4</link><guid>http://ayende.com/4667/raven-s-dynamic-queries#comment4</guid><pubDate>Wed, 20 Oct 2010 14:01:31 GMT</pubDate></item></channel></rss>