Question

I have no problem querying RavenDB from code, but sometimes a quick lookup directly to RavenDB would be nice. Unfortunately, I cannot figure it out despite tips that it uses Lucene syntax.

For example, I have a RegionLocation document:

{
  "RegionId": 804291854,
  "Name": "Miami",
  "Description": null,
  "DbRowStatus": 0,
  "CreatedBy": "Zorro",
  "UpdatedBy": null,
  "DeletedBy": null,
  "CreatedOn": "2013-06-05T18:31:37.4332753",
}

I haven't had any luck with quering it. RegionLocation.Name: M* returns no results. Any idea what I am doing wrong?

Was it helpful?

Solution

Assuming you already have an index that has the name mapped, or you are building a new dynamic index against the RegionLocation documents, then the syntax for your query would just be:

Name: M*

I agree that the documentation could be better - especially the in-application help. But you can find most of what you need to know here.

UPDATE

This was raised as Issue #1250, and closed in RavenDB 2.5.2750. The studio now includes easily accessible help:

                  Screenshot

The popup shows when you hover over the (i) icon, and the "Query syntax online" link points at the relevant Lucene documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top