Use this tag for version specific questions about Elasticsearch 7.0 - the distributed, RESTful search and analytics engine. When using this tag also include the more generic [elasticsearch] tag where possible.
Questions tagged [elasticsearch-7]
314 questions
0
votes
1 answer
Elasticsearch wildcard query rewrite parameter not working with new wildcard field type?
The Wildcard Query offers a rewrite parameter to influence how Lucene calculates the relevance scores. On keyword fields this works as expected but it does not seem to work with the new wildcard field type which belongs to the keyword family. Is…

cads
- 21
- 5
0
votes
1 answer
How to get all grandchild in elasticsearch 7.10 from the grandparent
I have a relationship in my elasticsearch in which A is a parent and B is a child of A and than C is a child of B.
A->B->C.
At the time of insertion the relationship was the same B have A as parent and in the insertion of grandchild B was the…

Root
- 955
- 1
- 16
- 39
0
votes
3 answers
Elasticsearch only one record based on userid?
In post index, postid is primary key and userid is foreign key.
i want all post but only post from one userid, such that only one user have the one post in results sort by postdate(optional latest first)
//Actual Result
[
{
userid:…

Ratan Uday Kumar
- 5,738
- 6
- 35
- 54
0
votes
1 answer
Converting the "long" data type to string/text in Elasticsearch
I'm looking to convert the data type of a field from long to text. I have a field with the mapping
"shopId": {
"type": "long"
}
I first iserted some documents like:
{"shopId": "25"},{"shopId": "26"},{"shopId": "27"}
I then added another field…

Sanchit Kulkarni
- 41
- 7
0
votes
1 answer
Elasticsearch query on zip_code failed
I have a strange behavior on elasticsearch that I cant explain.
When I do :
POST /ad_search/_search
{
"query": {
"match": {
"city_code": "2A247"
}
}
}
I have multiple result. But when I do (This code is generated by a librairies)…

Mathieu
- 100
- 5
0
votes
0 answers
ES query for one field exists, or if another has a certain value
I'm working on a dataset in Elasticsearch 7.6 where one field (published_at) is conditionally set. We're migrating to a new field (published) which will either be True or False, but I need to support backwards compatibility and can't backfill the…

jfefes
- 13
- 4
0
votes
1 answer
Problem on restore snapshot of "single node cluster" to "multi node cluster"
I have a single node cluster in my local windows Elasticsearch database, I make a snapshot of my index successfully. I have a 3 nodes cluster in my VMware, which each node(server) is Ubuntu.
While I was succeeded on restoring my snap shot to a…

ehsan_kabiri_33
- 341
- 6
- 13
0
votes
0 answers
has_child not working as expected inside has_parent,
I have a parent child relationship in my elasticsearch 7.9 where I am having the car as a parent type and it has multiple child types like honda, suzuki, volvo now I want to have a child of type volvo and parent type is car.
{
"query": {
…

Root
- 955
- 1
- 16
- 39
0
votes
1 answer
Elasticsearch 7.10 : How to safely remove a node and free up space?
As I am running out of my disk space, I want to remove all the indices from the node. Note that I have just one node, and I am running the elastic server on my local machine.
Basically, when I start the elastic server, it fails with the following…

Soumya Ranjan Sahoo
- 105
- 7
0
votes
1 answer
'Expected [START_OBJECT] under [field], but got a [VALUE_STRING] - on range aggregation - elasticserch 7.9
I have a long type field named notice_period , where I have values starting from 15 days to 120 days. I was looking for an aggregate query to get frequency(count) of all the intervals , i.e {'to': 15}, {'from': 16, 'to': 30}, {'from': 31, 'to': 45},…

lazarus
- 677
- 1
- 13
- 27
0
votes
1 answer
ElasticSearch, NEST, C# - How to set rest_total_hits_as_int request parameter?
I'm working on updating code to handle an update from ElasticSearch 6 to 7. This version changes how the total number of hits works (documentation). I'm new to using this library and am having difficulty seeing how I can use the NEST API to set…

Cities
- 163
- 1
- 11
0
votes
0 answers
How to do conditional fields in Elastic Search Dynamic Templates?
I have a dynamic template where my string mapping is set up as below:
{
"string_fields": {
"match_mapping_type": "string",
"mapping": {
"type": "text",
…

Ankit
- 45
- 1
- 7
0
votes
1 answer
Boolean query is not matching exclusive condition in ElasticSearch
I have the next problem, my data structure has this shape:
{"editions":['optionA', 'optionB']}
I need to exclude ALL results with this shape:
{"editions":['optionB']}
But include ALL results with this…

Cesar Jr Rodriguez
- 1,691
- 4
- 22
- 35
0
votes
2 answers
How to prevent shard relocation from hot nodes to warm or cold nodes?
What do I have:
Elasticsearch (7.7.0) cluster (amazon/opendistro-for-elasticsearch:1.8.0 Docker image)
one master node
one coordinating node
two data nodes with node.attr.data=hot
one data node with node.attr.data=warm
What do I want: prevent…

Tarasovych
- 2,228
- 3
- 19
- 51
0
votes
1 answer
ElasticSearch query is slow and first query always takes too much time
I'm new to elasticsearch, my queries are slow when i do should match with multiple search terms and also for matching nested documents, basically it is taking 7-10 sec for first query and 5-6 sec later on due to elasticsearch cache, but queries for…

Code Wizard
- 46
- 2
- 7