German umlauts (ö/ä/ü) in document titles

86 views
Skip to first unread message

Elias Stocker

unread,
Jul 18, 2014, 2:30:46 AM7/18/14
to rav...@googlegroups.com
Hello

I've problems with german umlauts (like ö/ä/ü) in document titles. In my case I've a document called Gespräch. As soon as an auto index is generated (in my case Index_Auto_Gespräches_ByBeurteilungId) for this document, all queries to the auto index fail.

My query is like

DocumentSession.Query<Gespräch>().Where(g => g.BeurteilungId == beurteilungId);

and leads to the following error:

Url: "/indexes/dynamic/Gespr%C3%A4ches?&query=BeurteilungId:f1b0d599%5C-454d%5C-493f%5C-8a04%5C-b7de7c3a2bde&pageSize=128"

System.InvalidOperationException: Compilation Errors:

Line 21, Position 21: Error CS1061 - 'System.Collections.Generic.IEnumerable<dynamic>' does not contain a definition for 'Gespr' and no extension method 'Gespr' accepting a first argument of type 'System.Collections.Generic.IEnumerable<dynamic>' could be found (are you missing a using directive or an assembly reference?)
Line 21, Position 29: Error CS0103 - The name 'C3' does not exist in the current context
Line 21, Position 34: Error CS0103 - The name 'A4ches' does not exist in the current context

Source code:
using Raven.Abstractions;
using Raven.Database.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System;
using Raven.Database.Linq.PrivateExtensions;
using Lucene.Net.Documents;
using System.Globalization;
using System.Text.RegularExpressions;
using Raven.Database.Indexing;


public class Index_Auto_2fGespr_25C3_25A4ches_2fByBeurteilungId : Raven.Database.Linq.AbstractViewGenerator
{
public Index_Auto_2fGespr_25C3_25A4ches_2fByBeurteilungId()
{
this.ViewText = @"from doc in docs.Gespr%C3%A4ches
select new { BeurteilungId = doc.BeurteilungId }";
this.AddMapDefinition(docs => 
from doc in docs.Gespr % C3 % A4ches
select new {
BeurteilungId = doc.BeurteilungId,
__document_id = doc.__document_id
});
this.AddField("BeurteilungId");
this.AddField("__document_id");
this.AddQueryParameterForMap("BeurteilungId");
this.AddQueryParameterForMap("__document_id");
this.AddQueryParameterForReduce("BeurteilungId");
this.AddQueryParameterForReduce("__document_id");
}
}



   at Raven.Database.Linq.QueryParsingUtils.DoActualCompilation(String source, String name, String queryText, OrderedPartCollection`1 extensions, String basePath, String indexFilePath)
   at Raven.Database.Linq.DynamicViewCompiler.GenerateInstance()
   at Raven.Database.Storage.IndexDefinitionStorage.AddAndCompileIndex(IndexDefinition indexDefinition)
   at Raven.Database.DocumentDatabase.PutIndex(String name, IndexDefinition definition)
   at Raven.Database.Queries.DynamicQueryRunner.CreateAutoIndex(String permanentIndexName, Func`1 createDefinition)
   at Raven.Database.Queries.DynamicQueryRunner.GetAppropriateIndexToQuery(String entityName, IndexQuery query, DynamicQueryMapping map)
   at Raven.Database.Queries.DynamicQueryRunner.ExecuteDynamicQuery(String entityName, IndexQuery query, CancellationToken token)
   at Raven.Database.Server.Responders.Index.PerformQueryAgainstDynamicIndex(IHttpContext context, String index, IndexQuery indexQuery, CancellationToken token, Etag& indexEtag)
   at Raven.Database.Server.Responders.Index.ExecuteQuery(IHttpContext context, String index, CancellationToken token, Etag& indexEtag)
   at Raven.Database.Server.Responders.Index.GetIndexQueryResult(IHttpContext context, String index)
   at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx)
   at Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx)

Do you have any specific requirements for document titles (e.g. only standard ASCII letters)?

My RavenDb Build: 2.5.2879

Oren Eini (Ayende Rahien)

unread,
Jul 18, 2014, 2:45:56 AM7/18/14
to ravendb
This looks like a bug when we are normalizing the text. Looking into that now.



Oren Eini

CEO


Mobile: + 972-52-548-6969

Office:  + 972-4-622-7811

Fax:      + 972-153-4622-7811





--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oren Eini (Ayende Rahien)

unread,
Jul 18, 2014, 4:49:05 AM7/18/14
to ravendb
Found and fixed the problem, will be in the next build.



Oren Eini

CEO


Mobile: + 972-52-548-6969

Office:  + 972-4-622-7811

Fax:      + 972-153-4622-7811





On Fri, Jul 18, 2014 at 9:30 AM, Elias Stocker <elias....@gmail.com> wrote:

--

Elias Stocker

unread,
Jul 18, 2014, 10:04:01 AM7/18/14
to rav...@googlegroups.com
I tried again with newest dev build 2.5.2904 and it worked. Thanks a lot!

Kijana Woodard

unread,
Jul 18, 2014, 10:46:54 AM7/18/14
to rav...@googlegroups.com
96 builds left....
;-)

Itamar Syn-Hershko

unread,
Jul 22, 2014, 9:30:32 AM7/22/14
to rav...@googlegroups.com
Awful build numbering convention. It leads to bugs not being fixed properly even if they are severe and pushed back to a later release or being fixed and breaking old code. Take this https://github.com/ayende/ravendb/pull/711 as an example (typo in the streaming API naming the IsStale property IsStable). This is a severe API bug that still exists in current v2.5 builds today.

--

Itamar Syn-Hershko
http://code972.com | @synhershko
Freelance Developer & Consultant

Chris Marisic

unread,
Jul 22, 2014, 2:07:47 PM7/22/14
to rav...@googlegroups.com
This is why I've recommended for a long time having RavenDB, RavenDB2, RavenDB3 and then using true SemVer major.minor.patch build numbers.

It's not too late to start.

The only cost is that a person couldn't upgrade from 2.5 to 3.0 with just nuget update, but i think that's a fair trade off. Jumping major editions of a product is not to be taken lightly.

Kijana Woodard

unread,
Jul 22, 2014, 2:54:19 PM7/22/14
to rav...@googlegroups.com
But your saying keep all the code the same...such that you still have "using Raven.Client;"? Correct?

Chris Marisic

unread,
Jul 22, 2014, 3:17:06 PM7/22/14
to rav...@googlegroups.com
As same as build 177 vs build 960 vs build 2030 vs build 2904 is the "same code" yes.

Kijana Woodard

unread,
Jul 22, 2014, 6:52:58 PM7/22/14
to rav...@googlegroups.com
Yeah. I was ambiguous there. I guess I meant keeping the assembly name and namespaces the same. :-)

Chris Marisic

unread,
Jul 23, 2014, 1:59:48 PM7/23/14
to rav...@googlegroups.com
Most certainly. The upgrade would still ultimately be just swap assemblies (or better yet done by a simple GUI tool that swaps the assemblies correctly, preventing remnants from borking an upgrade), it just no longer would be able to be done with nuget update. I personally find that to be a pro, not a con. Sometimes there's just ridiculous amounts of risk in nuget update. Like how jquery if you run nuget update you can end up on the version that no longer supports IE8 and break your whole site for an organization.

Kijana Woodard

unread,
Jul 23, 2014, 3:37:00 PM7/23/14
to rav...@googlegroups.com
yeah. upgrade !== good.
Reply all
Reply to author
Forward
0 new messages