Is index creation in Studio broken?

44 views
Skip to first unread message

JerryP

unread,
Mar 3, 2012, 10:48:05 PM3/3/12
to rav...@googlegroups.com
I just started playing around with RavenDB (build 701), and I'm having this strange error trying to create an index in Studio.  It's completely possible that I'm doing something wrong since this is my first time playing with Raven.

I've been trying to create a simple index through the Studio UI:
  docs.Albums.Select(a=> new { a.Title })
based on the default data but I get this error
Message: System.InvalidOperationException: Variable declaration must have an initializer which is a method invocation expression
   at Raven.Database.Linq.QueryParsingUtils.GetVariableDeclarationForLinqMethods(String query, Boolean requiresSelectNewAnonymousType) in c:\Builds\RavenDB-Stable\Raven.Database\Linq\QueryParsingUtils.cs:line 134

If however I try and replace the pre-built AlbumsByGenre index with the same exact linq statement it will save.

Am I doing something wrong?  

Jerry

Fitzchak Yitzchaki

unread,
Mar 4, 2012, 2:05:13 AM3/4/12
to rav...@googlegroups.com
No. This is working for me. Cannot reproduce.

Oren Eini (Ayende Rahien)

unread,
Mar 4, 2012, 5:05:43 AM3/4/12
to rav...@googlegroups.com
No, that is an error the server produces when it can't parse your code
What does your index looks like?

JerryP

unread,
Mar 4, 2012, 10:46:35 AM3/4/12
to rav...@googlegroups.com
It's exactly as I posted above:

 docs.Albums.Select(a=> new { a.Title }) 

but if I replace the AlbumsByGenre with the same text and save it works.

As simple as this is I'm not sure what I could be doing wrong.

Thanks.

Oren Eini (Ayende Rahien)

unread,
Mar 4, 2012, 11:06:48 AM3/4/12
to rav...@googlegroups.com
I am sorry, this is a bug in the studio, will be fixed in the next build.

JerryP

unread,
Mar 4, 2012, 11:22:23 AM3/4/12
to rav...@googlegroups.com
Thanks! I'll pull the next build.

Reply all
Reply to author
Forward
0 new messages