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

Search API: Allow to name filters and return per hit the filters it matched on #364

Closed
kimchy opened this issue Sep 11, 2010 · 1 comment

Comments

@kimchy
Copy link
Member

kimchy commented Sep 11, 2010

This really make sense for or / bool filters. Now, each filter can accept a _name in its top level definition, for example:

{
    "filtered" : {
        "query" : {
            "term" : { "name.first" : "shay" }
        },
        "filter" : {
            "terms" : {
                "name.last" : ["banon", "kimchy"],
                "_name" : "test"
            }
        }
    }
}

The search response will include for each hit the matched_filters it matched on.

Note, the query filter had to be enhanced in order to support this. In order to set a name, the fquery filter should be used, which wraps a query (just so there will be a place to set a name for it), for example:

{
    "filtered" : {
        "query" : {
            "term" : { "name.first" : "shay" }
        },
        "filter" : {
            "fquery" : {
                "query" : {
                    "term" : { "name.last" : "banon" }
                },
                "_name" : "test"
            }
        }
    }
}
@kimchy
Copy link
Member Author

kimchy commented Sep 11, 2010

Search API: Allow to name filters and return per hit the filters it matched on, closed by eccc7d5.

alpar-t added a commit to alpar-t/elasticsearch that referenced this issue May 9, 2018
- Apply workaround for: johnrengelman/shadow#336
- bump plugin to 2.0.4

Changes between 2.0.2 and 2.0.4 of the plugin:
```
477db40 12 days ago john.engelman@target.com Release 2.0.4
3e3da37 3 weeks ago john.engelman@target.com Remove internal Gradle API and annotation internal getters on shadow jar.
31e2380 3 weeks ago john.engelman@target.com Close input streams. Closes elastic#364
f712cc8 3 weeks ago john.engelman@target.com Upgrade ASM to 6.1.1 to address perf issues. Closes elastic#374
2f94b2b 3 weeks ago john.engelman@target.com next version
23bbf3d 7 weeks ago john.r.engelman@gmail.com Add some gradle versions. Update changelog for 2.0.3
7435c74 7 weeks ago john.r.engelman@gmail.com Merge pull request elastic#367 from ttsiebzehntt/366-java10
325c002 7 weeks ago info@martinsadowski.de Update ASM to 6.1
94550e5 3 months ago john.r.engelman@gmail.com Merge pull request elastic#356 from sgnewson/update-file-to-files
66b691e 4 months ago john.r.engelman@gmail.com Merge pull request elastic#358 from 3flex/patch-1
14761b1 4 months ago 3flex@users.noreply.github.com fix markdown for User Guide URL in issue template
a3f6984 4 months ago newson@synopsys.com update inputs.file to inputs.files, to remove warning
```

closes elastic#30389
alpar-t added a commit that referenced this issue May 10, 2018
* Solve Gradle deprecation warnings around shadowJar

- Apply workaround for: johnrengelman/shadow#336
- bump plugin to 2.0.4

Changes between 2.0.2 and 2.0.4 of the plugin:
```
477db40 12 days ago john.engelman@target.com Release 2.0.4
3e3da37 3 weeks ago john.engelman@target.com Remove internal Gradle API and annotation internal getters on shadow jar.
31e2380 3 weeks ago john.engelman@target.com Close input streams. Closes #364
f712cc8 3 weeks ago john.engelman@target.com Upgrade ASM to 6.1.1 to address perf issues. Closes #374
2f94b2b 3 weeks ago john.engelman@target.com next version
23bbf3d 7 weeks ago john.r.engelman@gmail.com Add some gradle versions. Update changelog for 2.0.3
7435c74 7 weeks ago john.r.engelman@gmail.com Merge pull request #367 from ttsiebzehntt/366-java10
325c002 7 weeks ago info@martinsadowski.de Update ASM to 6.1
94550e5 3 months ago john.r.engelman@gmail.com Merge pull request #356 from sgnewson/update-file-to-files
66b691e 4 months ago john.r.engelman@gmail.com Merge pull request #358 from 3flex/patch-1
14761b1 4 months ago 3flex@users.noreply.github.com fix markdown for User Guide URL in issue template
a3f6984 4 months ago newson@synopsys.com update inputs.file to inputs.files, to remove warning
```

closes #30389

* Improove comment as suggested
ClaudioMFreitas pushed a commit to ClaudioMFreitas/elasticsearch-1 that referenced this issue Nov 12, 2019
mindw pushed a commit to mindw/elasticsearch that referenced this issue Sep 5, 2022
…ic#364)

MPC-3977: pm2 logs to grafana

* dumb first pass, dropping syslog and using a greedy grok tail

* remove now useless rsyslog config

* add telegraf to adm instead of syslog


Approved-by: Can Yildiz
costin pushed a commit that referenced this issue Dec 6, 2022
As a followup to the previously added operator factories, this PR
enriches the driver parallelism type, for improved operator logging.
cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Oct 2, 2023
Co-authored-by: Dale Mcdiarmid <dale@elastic.co>
emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this issue Dec 26, 2023
…stic#364, fixes elastic#359

- Fix bug with update document with doc_as_upsert and scripting

Signed-off-by: Salimane Adjao Moustapha <me@salimane.com>
emilykmarx pushed a commit to emilykmarx/elasticsearch that referenced this issue Dec 26, 2023
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