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

DATAES-399 - added term_vector mapping parameter #189

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@kudnurub
Copy link

commented Sep 30, 2017

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our JIRA.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@odrotbohm odrotbohm force-pushed the spring-projects:master branch from 020b5e1 to ba3eba5 Jun 18, 2018

*/
WITH_POSITIONS_OFFSETS("with_positions_offsets");

private String termVectorType;

This comment has been minimized.

Copy link
@xhaggi

xhaggi Nov 20, 2018

Collaborator

To do it the same way as in enum DateFormat, please use lower-case enum values. This way we don't need termVectorType.

@@ -251,6 +255,9 @@ private static void addSingleFieldMapping(XContentBuilder xContentBuilder, java.
if (isNotBlank(fieldAnnotation.analyzer())) {
xContentBuilder.field(FIELD_INDEX_ANALYZER, fieldAnnotation.analyzer());
}
if (fieldAnnotation.termVector() != FIELD_TERM_VECTOR_DEFAULT) {
xContentBuilder.field(FIELD_TERM_VECTOR, fieldAnnotation.termVector());
}

This comment has been minimized.

Copy link
@xhaggi

xhaggi Nov 20, 2018

Collaborator

To avoid doing it twice, please move this into the method MappingBuilder#addFieldMappingParameters()

@@ -278,6 +285,9 @@ private static void addNestedFieldMapping(XContentBuilder builder, java.lang.ref
if (annotation.fielddata()) {
builder.field(FIELD_DATA, annotation.fielddata());
}
if (annotation.termVector() != FIELD_TERM_VECTOR_DEFAULT) {
builder.field(FIELD_TERM_VECTOR, annotation.termVector());
}

This comment has been minimized.

Copy link
@xhaggi

xhaggi Nov 20, 2018

Collaborator

This should be gone.

@@ -290,6 +300,9 @@ private static void addMultiFieldMapping(XContentBuilder builder, java.lang.refl
MultiField annotation, boolean nestedOrObjectField) throws IOException {
builder.startObject(field.getName());
builder.field(FIELD_TYPE, annotation.mainField().type());
if (annotation.mainField().termVector() != FIELD_TERM_VECTOR_DEFAULT) {
builder.field(FIELD_TERM_VECTOR, annotation.mainField().termVector());
}

This comment has been minimized.

Copy link
@xhaggi

xhaggi Nov 20, 2018

Collaborator

This should be gone.

@pivotal-issuemaster

This comment has been minimized.

Copy link

commented Jun 4, 2019

@kudnurub Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

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.