---
description: Create RavenDB indexes for efficient document queries (project)
---
# Add RavenDB Index Skill
Create RavenDB indexes for efficient document queries in NovaTune.
## Project Context
- Index location: `src/NovaTuneApp/NovaTuneApp.ApiService/Infrastructure/RavenDb/Indexes/`
- Naming convention: `{Collection}_{By|For}{Criteria}.cs`
- Example: `Users_ByEmail.cs`, `Tracks_ByUserForSearch.cs`
## Steps
### 1. Create Index Class
Location: `src/NovaTuneApp/NovaTuneApp.ApiService/Infrastructure/RavenDb/Indexes/{IndexName}.cs`
```csharp
using NovaTuneApp.ApiService.Models;
using Raven.Client.Documents.Indexes;
namespace NovaTuneApp.ApiService.Infrastructure.RavenDb.Indexes;
///
/// RavenDB index for {description}.
///
public class Tracks_ByUserForSearch : AbstractIndexCreationTask