I have an object with a string field stored in a RavenDB. For example:
public class SomeObject
{
public string SomeText = "hello world";
}
I want to be able to check both of the following in the same query:
- Checking if the entire string starts with a certain value. In this case:
- "hell" would match
- "hello" would match
- "hello w" would match
- "world" would not match
- "world hello" would not match
- Checking if the string contains certain terms. Assuming they are space separated, in this case:
- "hell" would not match
- "hello" would match
- "hello w" would not match
- "world" would match
- "world hello" would match
What is a good way to setup the indexing (I assume?) to be able to do this in the same query?
Edit: Clarified that I want to be able to check both things in the same query.