Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to use a content-type in multiple indexes #651

Open
Pablo-Aldana opened this issue Feb 7, 2023 · 7 comments · May be fixed by #916
Open

Possibility to use a content-type in multiple indexes #651

Pablo-Aldana opened this issue Feb 7, 2023 · 7 comments · May be fixed by #916
Labels
enhancement New feature or request

Comments

@Pablo-Aldana
Copy link
Contributor

Description
Not sure if it is a new feature request or a bug but:
Possibility to use a content-type in multiple indexes
Currently it is possible to create custom indexes and for example create a index called products with content-type Shoes and T-shirts

But once you create one you cannot re-use the content type for another index example "offers".

For my understanding it is possible to do it with meilisearch as you can add any information to any index but it is not possible with this plugin.

Basic example
An option could be to change the config of the plugin and instead write the content type name as root of the json, use instead the index name

currently the config looks like

module.exports = () => ({
  //...
  meilisearch: {
    config: {
      shirts: {
        indexName: 'products',
      },
      shoes: {
        indexName: 'products',
      },
    shirts: {
indexName: 'offers'. //THIS is not possible right now as overwrite previous index.
}
    },
  },
})

What I propose is

module.exports = () => ({
  //...
  meilisearch: {
    config: {
      products: {
        contentType: ['shoes','t-shirt']
      },
      offers: {
         contentType: ['jackets','t-shirt']
      },
     
    },
  },
})

Or as it is right now but not overwriting previous information and being able to manage it over the admin panel. But I do believe it would be easier the first option.

@bidoubiwa bidoubiwa added the enhancement New feature or request label Feb 15, 2023
@bidoubiwa
Copy link
Contributor

Hey @Pablo-Aldana
It is indeed a new feature request! No reason why we shouldn't implement this, it's a good idea!

I will add it to the stack of new features to add in this plugin. Meanwhile if someone wants to contribute and implement it, it can be faster!

@ghost
Copy link

ghost commented Jul 26, 2023

Any news on this?

@curquiza
Copy link
Member

Hello @ddegooijer and anyone reading this issue

Feel free to open a PR, we are available for review!

@L-Weisz
Copy link

L-Weisz commented Mar 25, 2024

Hello @bidoubiwa how far are we to this update ?

@curquiza
Copy link
Member

hello @L-Weisz
No one implemented it yet.

@L-Weisz L-Weisz linked a pull request Apr 4, 2024 that will close this issue
3 tasks
@L-Weisz
Copy link

L-Weisz commented Apr 4, 2024

Hello I created a pull request to handle multiple indexes, I also have the a fork with the changes if anyone want to use it immediately

@curquiza
Copy link
Member

curquiza commented Apr 4, 2024

Hello @L-Weisz thank you very much for this PR

@brunoocasali will review it once he will come back from Holidays (starting today evening and he comes back in 3 weeks)

In the meantime, everyone is more than welcome to review it and give their feedback ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants