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

Add option for default indices #3

Open
danaki opened this issue Aug 9, 2019 · 1 comment
Open

Add option for default indices #3

danaki opened this issue Aug 9, 2019 · 1 comment

Comments

@danaki
Copy link

danaki commented Aug 9, 2019

My Sphinx instance is shared between prod and stage envs. Both envs use different databases indeed, but sphinx' index is different. I want to make use of Symfony's configuration and override default config of the bundle to use different index names for each environment. Please make a configuration option that specifies the default index list.

@pluk77
Copy link
Owner

pluk77 commented Aug 12, 2019

The index name is passed via the Query::from() method and has no default value. If you do not pass an index, an exception will be thrown by the Query::buildQuery() method.

I would create a custom parameter in your config files which you change depending on the environment you are working in. You then pass the custom parameter to the from() function in your business logic.

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

No branches or pull requests

2 participants