Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Bulk action removes all whitespaces from content of inner index actions #60

Closed
asukhorukova opened this issue Aug 1, 2013 · 0 comments
Assignees
Labels
Milestone

Comments

@asukhorukova
Copy link

I want to execute several index actions in a bulk action.
Each index action contains data with some text fields with white spaces.
The problem is that fact that data which was indexed with bulk action loses all whitespaces.
Single index action works fine.

Here is piece of my code:

    public void indexAll(List<EntityIndexData> entityIndexDataList) throws     SearchRequestFailedException {

        Bulk.Builder bulkBuilder = new Bulk.Builder();
        for (EntityIndexData entityIndexData : entityIndexDataList) {
            bulkBuilder.addAction(prepareIndex(entityIndexData));
        }
        this.client.execute(bulkBuilder.build());
    }

    private Index prepareIndex(EntityIndexData entityIndexData) {
        return new Index.Builder(entityIndexData.getIndexContent())
            .index(INDEX_NAME)
            .type(entityIndexData.getEntityType())
            .id(entityIndexData.getEntityId())
            .build();
    }

Please let me know if something is wrong in my code and suggest a way to fix this problem.
Thank you in advance.

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

No branches or pull requests

2 participants