RavenDB extended query Lucene

I really learn ropes on both lucene and ravendb. I have the following document in Raven -

{
  "InternalEvent": {
    "Desec": "MachineInfo: 1F8BFBFF000106A5_2103933941_00155D365607_WIN-UWJJ7OPR9TM_1, UserInfo: NT AUTHORITY\\LOCAL SERVICE_3, ProcessInfo: \\Device\\HarddiskVolume1\\Windows\\System32\\taskeng.exe, Pid: 5772, ObjInfo: , EventId: New Process Stopped",
    "MachineInfo": "1F8BFBFF000106A5_2103933941_00155D365607_WIN-UWJJ7OPR9TM_1",
    "UserInfo": "NT AUTHORITY\\LOCAL SERVICE_3",
    "ProcessInfo": "\\Device\\HarddiskVolume1\\Windows\\System32\\taskeng.exe",
    "Pid": 5772,
    "ObjInfo": "",
    "EventId": "New Process Stopped",
    "Occured": "2011-08-08T23:25:31.8220000+01:00"
  },
  "Key": "6c4abf6a-156e-4224-8eac-72cde756b3c6"
}

I am querying a database using

var searchValue = "InternalEvent:Desec:(" + String.Join(" AND ", searchTerms) + ")";
var eventEntities = session.Advanced.LuceneQuery<EventCacheEntity>()
                                  .WaitForNonStaleResultsAsOfLastWrite()
                                  .Skip(0)
                                  .Take(_pageLimit)
                                  .Where(searchValue);

searching for anything, as if searchTerms had only one term like Machine, which is definitely in the desec field. what am I doing wrong?

I'm not too sure about the nested fields in the lucene query syntax, i.e. Internalevent: Desec ??

+5
source share
1 answer

The syntax is for nested fields InternalEvent.Desec, but I'm not quite sure what you are trying to do with search queries

+4
source

All Articles