Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to query in ravendb studio?

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?

like image 487
Zulu Z Avatar asked Mar 22 '23 22:03

Zulu Z


1 Answers

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.

like image 74
Matt Johnson-Pint Avatar answered Apr 08 '23 20:04

Matt Johnson-Pint