examples for elasticsearch
Closed this issue · 2 comments
jodinathan commented
Hi,
I am trying to use the ElasticSearch adapter, but I can't seem to use the exists
keyword nor how to use field IN ['a', 'b']
.
I tried to dig the source code but couldn't find how to do it.
Can you share some examples please?
jodinathan commented
found it out.
It can use directly lucene syntax, ie:
final query = db.Query.parse(
'_exists_:steps.payment_success',
skip: 0,
take: 1,
sorter: db.PropertySorter.descending('updated_at'),
schema: MapSchema({
'name': StringSchema(),
})
);
final results = await collection.search(
query: query,
);
However, the above code is returning the whole document in results.snapshopts
, is this correct?
terrier989 commented
I close this because we are seeking a simpler, better design for the API and it will take some time before the package is ready for the public.