I "accidentally" had some documents stored in RavenDB with all the properties camel-cased because of a setting made with the json serializer ( json.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); ).

Now I'm storing new documents using Pascal-casing. Can I search for documents ignoring case of the property name?

Eg.

Old document format:
{
  name : "foo",
  someStuff : "buzz"
}

New document format:
{
  Name : "bar",
  SomeStuff : "baz"
}

Thanks!

有帮助吗?

解决方案

You would need to use the LuceneQuery to manually set the property name for the query.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top