0

I have an entity type:

public class Log
{
    public int Id { get; set; }
    public string Action { get; set; }
    public string Message { get; set; }
}

And my Index:

public class LogIndex : AbstractIndexCreationTask<Log>
{
    public LogIndex()
    {
        Map = xs => from x in xs
                    select new
                    {
                        x.Id,
                        x.Action,
                        x.Message 
                    };
    }
}

And then I store an entity{ Action: "GetMessage", Message: "This is my Hello World message."}.

Then I can get this entity by Message:(Hello World) or Message:"Hello World" on Raven Studio.

Now I want to Proximity Search this entity by Message:(Hello World)~2, I get an exception unexpected tilde.

Then I use Message:"Hello World"~2, I get nothing. What should I do? Thank you.

Lcng
  • 706
  • 1
  • 8
  • 17

1 Answers1

0

In order to support proximity search, you need to mark the Message as analyzed and use Message:"Hello World"~2

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41