Questions tagged [elasticsearch-query]

Elasticsearch provides a full Query DSL based on JSON to define queries. In general, there are basic queries such as term or prefix. There are also compound queries like the bool query. Queries can also have filters associated with them such as the filtered or constant_score queries, with specific filter queries.

Elasticsearch provides a full Query DSL based on JSON to define queries. In general, there are basic queries such as term or prefix. There are also compound queries like the bool query. Queries can also have filters associated with them such as the filtered or constant_score queries, with specific filter queries.

Certain queries can contain other queries (like the bool query), others can contain filters (like the constant_score), and some can contain both a query and a filter (like the filtered). Each of those can contain any query of the list of queries or any filter from the list of filters, resulting in the ability to build quite complex (and interesting) queries.

634 questions
0
votes
1 answer

How to use elasticsearch facet query to groupby the result

I have a json data in the below format { "ID": { "Color": "Black", "Product": "Car" }, "ID": { "Color": "Black", "Product": "Car" }, "ID": { "Color": "Black", "Product": "Van" }, "ID": { "Color": "Black", "Product": "Van" }, "ID": { "Color": "Ash",…
Mangoski
  • 2,058
  • 5
  • 25
  • 43
0
votes
0 answers

Kibana - join in the same index

I have the most basic knowledge in Kibana, and perhaps just a little bit more of Elasticsearch. Is this possible to build a query which will return all items where field_A == field_B? In sql world, it would be something like: select * from MyTalbe…
shay__
  • 3,815
  • 17
  • 34
0
votes
1 answer

How to write a match query OR with a prefix query

For example if have a string "nite out" now i want my strings to match with "nite" OR match its prefix with "out", So for the above string scoring must be like at the first "nite out", "nite outing", "nite" and "out" same priority, "outing".
0
votes
1 answer

Which Query to use in Elasticsearch tp perform all substring matched results?

I want to implement a shop name search feature, now if i write a shop name "nite out" then I want my results containing all sub string "nite" and "out" and "nite out" also. I tried using prefix query but wasn't able to perform that. I have heard…
-1
votes
1 answer

Do I need to explicitly clear the index cache after indexing/updating a document?

I have a program that indexes multiple documents into OpenSearch every second. I make these documents available to query on a dashboard with a fixed set of filters. From what I've read online, OpenSearch will cache the results of queries. When I…
Jacob G.
  • 28,856
  • 5
  • 62
  • 116
-1
votes
1 answer

Extract elasticsearch query output in csv with java

I'm using java for querying Elasticsearch; I want to export the data of my query in csv file. I'm breaking my head over this.. please can anyone help me with this code? I would be grateful. This is my query code in java try { …
-1
votes
1 answer

How do I perform this elasticsearch query

Lets say I have an index with movie details held by multiple DVD stores. Some of the relevant fields are 'store_id' , 'genre' and 'acquired_at'. For a particular store, I want to retrieve the details of the latest acquired movie for each genre. I…
-1
votes
2 answers

ES suggest, search all words in index item (not only the first word)

Based on this answer (the first option) I've created this index: 'settings' => array( 'analysis' => array( 'analyzer' => array( 'stop_analyzer' => array( 'type' => 'custom', …
Orry
  • 659
  • 6
  • 21
-1
votes
1 answer

How to search multiple string in all attributes using DSL query?

I went through link How to search in all attributes using DSL query? My requirement is searching multiple string For one string below is the DSL query GET /_search { "query": { "query_string": { "query": "string1" } } } FOr…
user6882757
-1
votes
1 answer

Python : wildcard query in Elasticsearch

I want to query a field using wildcard in Elasticsearch but the problem is that the search string is stored in a variable and not available statically. The intended query is : body={"query": {"wildcard": {"Name": { "value" : "Vi?????" }}}} where…
-1
votes
2 answers

Questions about joint query?

Use Elasticsearch to search " productID of a or (productID of b and price of c) " with devp of kibana This is my code: (what is right?) GET my_store/products/_search { "query":{ "bool":{ "should":[ { …
yx yao
  • 1
  • 2
-1
votes
2 answers

What is the opposite of contains in Elasticsearch?

Which query can I use in Elasticsearch to find/filter something that does not contain some value/text? Is it possible in Elasticsearch?
Y.Y.
  • 664
  • 1
  • 6
  • 22
-1
votes
2 answers

how to use must and should in elastic search

I have data in elasticsearch like this: { a : "status", b : "01" }, { a : "status b", b : "02" } I want to get all data with must and should I have tried wit must and should query like this { "query": { "bool": { …
DZS
  • 337
  • 1
  • 4
  • 13
-1
votes
1 answer

In ElasticSearch, is there a way to get the number of terms matched for each match returned by ES for a term query request?

For a given term query search request, will i be able to find the number terms matched for each of the value returned by ElasticSearch? If suppose i have a input as - { "query": { "match" : { "message" : "this is a test" …
Arun Prakash
  • 57
  • 1
  • 11
-1
votes
1 answer

NEST is not returning values for an exact search

I am trying to build a dynamic query using NEST which is as under string product = "goldpgl"; string agencyid = "1123"; ISearchResponse res = client().Search(s => s .Index("proddata") …
priyanka.sarkar
  • 25,766
  • 43
  • 127
  • 173
1 2 3
42
43