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

Already on GitHub? Sign in to your account

XWIKI-6218: Possibility to exclude attachments of a certain mimetype from the search #49

Merged
merged 5 commits into from Aug 21, 2012

Conversation

Projects
None yet
2 participants
Contributor

savis commented May 30, 2012

The mimetype is stored by the plugin in AttachmentData. Added Mimetype as index field.

@savis savis closed this May 30, 2012

@savis savis reopened this May 30, 2012

@sdumitriu sdumitriu commented on an outdated diff May 30, 2012

.../java/com/xpn/xwiki/plugin/lucene/AttachmentData.java
@@ -56,6 +56,9 @@
/** How much to weight down fields from the owner document that are not that relevant for attachments. */
private static final float IRRELEVANT_DOCUMENT_FIELD_BOOST = 0.1f;
+ /** The importance of the attachment mimetype. */
+ private static final float MIMETYPE_BOOST = 3f;
@sdumitriu

sdumitriu May 30, 2012

Owner

This is too much, the MIME isn't very specific to each document, so the value should be kept small, let's say 0.5f;

@ghost ghost assigned sdumitriu Aug 21, 2012

@sdumitriu sdumitriu added a commit that referenced this pull request Aug 21, 2012

@sdumitriu sdumitriu Merge pull request #49 from savis/master
XWIKI-6218: Possibility to exclude attachments of a certain mimetype from the search
b0de3b6

@sdumitriu sdumitriu merged commit b0de3b6 into xwiki:master Aug 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment