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

CouchDB River: Allow to define a javascript that can munge the changes stream #431

Closed
kimchy opened this issue Oct 14, 2010 · 1 comment
Closed

Comments

@kimchy
Copy link
Member

kimchy commented Oct 14, 2010

A javascript can be provided within the couchdb settings that can munge the changes stream. The json provided to the script is under a var called ctx with the relevant seq stream change (for example, ctx.doc will refer to the document, or ctx.deleted is the flag if its deleted or not).

Note, this feature requires the lang-javascript plugin.

The ctx.doc can be changed and its value can will be indexed (assuming its not a deleted change). Also, if ctx.ignore is set to true, that change seq will be ignore and not applied.

Here is an example setting that adds field1 with value value1 to all docs.

{
    "type" : "couchdb",
    "couchdb" : {
        "script" : "ctx.doc.field1 = 'value1'"
    }
}
@kimchy
Copy link
Member Author

kimchy commented Oct 14, 2010

CouchDB River: Allow to define a javascript that can munge the changes stream, closed by ed9d9aa.

medcl pushed a commit to medcl/elasticsearch that referenced this issue Jul 1, 2011
ClaudioMFreitas pushed a commit to ClaudioMFreitas/elasticsearch-1 that referenced this issue Nov 12, 2019
Bump default version to 6.2.2 and 5.6.8
costin pushed a commit that referenced this issue Dec 6, 2022
🤖 ESQL: Merge upstream
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Oct 2, 2023
with elastic/rally#1259 we changed segment memory charts to be on a logarithmic scale. This is the final step to getting them visualized on elasticsearch-benchmarks.elastic.co
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant