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

Storing queries in ElasticSearch and use it like a view #4741

Closed
obfischer opened this issue Jan 15, 2014 · 4 comments
Closed

Storing queries in ElasticSearch and use it like a view #4741

obfischer opened this issue Jan 15, 2014 · 4 comments

Comments

@obfischer
Copy link

It is easy to query ElasticSearch but exchanging with others is not as easy as I would like to have it.

I would like to have the possibillity to save queries to ElasticSearch in a way similar to the percolator API:

url -XPUT localhost:9200/_query/myqueryname -d '{
    "query" : {
        "term" : {
            "field1" : "value1"
        }
    }
}'

Later I would like to execute the query via

curl -X GET localhost:9200/_query/myqueryname

I think such a functionality is not available in ElasticSearch at the moment. Or?

@MaineC
Copy link

MaineC commented Jan 15, 2014

Hi Oliver,

What you describe sounds pretty similar to a plugin I'm currently working on: My goal goes a bit further in that I would like to be able to store a query template that at query time can then be filled with actual parameters. For a first stab at this functionality see here: https://github.com/MaineC/elasticsearch-query-templates

Storing and later loading such templates is what I am looking into right now.

Isabel

@uboness
Copy link
Contributor

uboness commented Jan 15, 2014

+1 on Isabel's comment... Plus we currently support attaching filters to aliases... These are not queries (so no scoring) but they can serve as a filtered views into your data

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-aliases.html#filtered

On Wed, Jan 15, 2014 at 9:29 AM, Isabel Drost-Fromm
notifications@github.com wrote:

Hi Oliver,
What you describe sounds pretty similar to a plugin I'm currently working on: My goal goes a bit further in that I would like to be able to store a query template that at query time can then be filled with actual parameters. For a first stab at this functionality see here: https://github.com/MaineC/elasticsearch-query-templates
Storing and later loading such templates is what I am looking into right now.

Isabel

Reply to this email directly or view it on GitHub:
#4741 (comment)

@MaineC MaineC mentioned this issue Feb 11, 2014
@javanna
Copy link
Member

javanna commented Apr 23, 2014

Hi @obfischer , did you have a look at the search template feature that got released with 1.1? That should be what you were looking for, have a look at #5637 as well for further improvements on it.

Closing this issue for now, feel free to reopen though if you think search templates don't address it.

@javanna javanna closed this as completed Apr 23, 2014
@obfischer
Copy link
Author

Hi @javanna, yes this is what I suggested. Great to see this available.

dnhatn added a commit that referenced this issue Oct 12, 2019
If we roll translog but do not index, then a flush without force is a 
noop. In this case, the number of retained translog files will be higher
than the value specified by the retention policy.

Closes #4741
dnhatn added a commit that referenced this issue Oct 14, 2019
If we roll translog but do not index, then a flush without force is a 
noop. In this case, the number of retained translog files will be higher
than the value specified by the retention policy.

Closes #4741
dnhatn added a commit that referenced this issue Oct 14, 2019
If we roll translog but do not index, then a flush without force is a 
noop. In this case, the number of retained translog files will be higher
than the value specified by the retention policy.

Closes #4741
dnhatn added a commit that referenced this issue Oct 14, 2019
If we roll translog but do not index, then a flush without force is a 
noop. In this case, the number of retained translog files will be higher
than the value specified by the retention policy.

Closes #4741
howardhuanghua pushed a commit to TencentCloudES/elasticsearch that referenced this issue Oct 14, 2019
If we roll translog but do not index, then a flush without force is a 
noop. In this case, the number of retained translog files will be higher
than the value specified by the retention policy.

Closes elastic#4741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants