Hello,
I've been working on a query that can search a Document from my reservation index,
These Reservations has a "SequenceId" on which thesearch query works with.
This is the format of the ID: LLL-0000-000000
Product asked me to make it so that you can search on the full ID and the last 6 digits.
And the query for the Full ID works, but when I use another Wildcard query for the last 6 digit search:
var ShortIdSearchReservations = await Repository.ElasticClient.SearchAsync<Reservation>(s =>s.
Query(q => q
Wildcard(w => w
.Field(f => f.SequenceId)
.Value($"*{IdForSingleSearch}"))));
It returns documents that have those last 6 digits in their SequenceId, but the documents of type aren't complete and are missing an ID (A Guid) that I need later in my code.
But when I use that same query with a full ID (so starting with LLL-... etc) it does work and gets the Guid correctly.
Anyone any idea why this happens?
Is there some sort of 'Include' I need to add when retrieving multiple documents?
Kind regards