directus-dart icon indicating copy to clipboard operation
directus-dart copied to clipboard

[Question] Fulltext search

Open MichalNemec opened this issue 2 years ago • 2 comments

Hello, Can i get please example how to do fulltext search? i tried to modify library with query with search param

await DirectusApi.sdk.items('Products').readMany(
              query: Query(fields: ["id,name"], search: 'numb'),
              filters: Filters(
                {
                  'status': Filter.eq("published"),
                },
              ),
            );

with this im getting correctly product, but if i add translation relation, then i really dont know, that leads me to fulltext ability

Thanks!

MichalNemec avatar May 21 '22 15:05 MichalNemec

Can you point me to directus docs where it shows how to do full text search, or how the url should look like

apstanisic avatar Jun 25 '22 18:06 apstanisic

Hello,

Can i get please example how to do fulltext search?

i tried to modify library with query with search param


await DirectusApi.sdk.items('Products').readMany(

              query: Query(fields: ["id,name"], search: 'numb'),

              filters: Filters(

                {

                  'status': Filter.eq("published"),

                },

              ),

            );

with this im getting correctly product, but if i add translation relation, then i really dont know, that leads me to fulltext ability

Thanks!

Um.. it's still not available with the latest release of directus but there are a few folks who've tried their own approach.

Check this discussion out 👇 https://github.com/directus/directus/discussions/4492

reev-create avatar Jun 26 '22 18:06 reev-create

With version 0.9.3, you can pass any filter. Please reopen if there is any issue

    final res = await sdk.items('contacts').readMany(
          filters: Filters(
            {
              'id': 1,
              'any_value': {'deep': 'test'}
            },
          ),
          query: Query(limit: 1),
        );

apstanisic avatar Jan 10 '23 19:01 apstanisic