atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Improve @tomic/lib search API

Open Polleps opened this issue 1 year ago • 0 comments

Using Atomics full text search feature with @tomic/lib could be better.

Currently it's not very straightforward

const subject = buildSearchSubject(
  serverUrl,
  query,
);

const searchResource = await this.store.fetchResourceFromServer(subject, {
  noWebSocket: true,
});

const results = searchResource.get(server.properties.results);

Something like this would be a lot better:

const results = await store.search(query);

Polleps avatar Feb 08 '24 13:02 Polleps