I would like to know the search query for the following condition. I created an index called MeetingEventIndex, as shown below:
public class MeetingEventIndex : AbstractIndexCreationTask<mngtMeetingEvent> { public MeetingEventIndex () { Map = docs => from d in docs select new {d.meetingroomid, d.text, d.details}; Index(x=>x.meetingroomid, FieldIndexing.Analyzed); Index(x=>x.text, FieldIndexing.Analyzed); Index(x=>x.details, FieldIndexing.Analyzed); } }
I am trying to create a search query as shown below: Search for a term in a text box or information field and meetingroomid == 123 "
docsession.Query<mngtMeetingEvent, MeetingEventIndex>() .Search(x=>x.text , search) .Search(x=>x.details, search. options: SearchOptions.Or) .Search(x=>x.meetingroomid, "123", option.SearchOptions.And) .ToList()
But this does not return any result.
I am mainly looking for ((searchterm in the text box || searchterm in the details field) and mrcode in the commroomroom field).
Please, help.
source share