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

Merge Settings are misleading #3166

Closed
s1monw opened this Issue Jun 12, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@s1monw
Copy link
Contributor

commented Jun 12, 2013

today we have a settings index.compound_format that if set to true tells lucene to use a compound index format. Yet, this might be confusing to many folks since what lucene does is it only uses CFS if the segment that is written is < 10% of the rest of the index. This is an impl detail of lucene and ES should manage user expectation and use CFS all the time if set to true.

@ghost ghost assigned s1monw Jun 12, 2013

@s1monw s1monw closed this in 8e33e0e Jun 12, 2013

s1monw added a commit that referenced this issue Jun 12, 2013

Use CFS in any case if index.compound_format is set to true
Lucenes MergePolicies support a noCFSRatio. This commit introduces
support for this ratio via `index.compound_format`. This setting
can parse a boolean value or a value in the interval [0..1] that
is equivalent to the noCFSRatio. The setting `1`, `1.0` and `true`
are equivalent as well as `0`, `0.0` and `false`.

Closes #3166
@lukas-vlcek

This comment has been minimized.

Copy link
Contributor

commented Jun 13, 2013

@s1monw Do I understand it correctly that is it possible to update CFS ratio on the fly? Thus switching from/to CFS completely as needed? If yes, how does it work then, it apply only on the new segments? Or it generally influences how segments are merged? In other words, if CFS is turned off and I turn it on, it will probably take some time for the change to take effect - until the next merge?

Anyway, thanks for looking at this!

@s1monw

This comment has been minimized.

Copy link
Contributor Author

commented Jun 13, 2013

@lukas-vlcek you can update that ratio in realtime via the API. Yet, the merge policy that is in use at this point will not pick up the changes. You need to execute a flush via the API to enforce a new indexwirter to be opened. Like this: curl -XPOST 'http://localhost:9200/index_name/_flush?full=true' this will cause a new writer to be opened and a new MergePolicy will be created with the new settings. If you want to enforce CFS then you can just run an optimize.

@lukas-vlcek

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2013

Thanks, it seems to work fine for me. (Looking forward to the new release).

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Use CFS in any case if index.compound_format is set to true
Lucenes MergePolicies support a noCFSRatio. This commit introduces
support for this ratio via `index.compound_format`. This setting
can parse a boolean value or a value in the interval [0..1] that
is equivalent to the noCFSRatio. The setting `1`, `1.0` and `true`
are equivalent as well as `0`, `0.0` and `false`.

Closes elastic#3166
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.