How can i add char_filter for a single field

I have this index which contains filds "firstName", "lastName", "patronymic", "birthDate" and i need to add char_filter for field "birthDate". For example, 1939-02-21 have to be 1939.02.21. All fields are text. Is it possible to create char_filter that will affect on "birthDate" and not other fields? >Solution : In Elasticsearch, you can achieve this by… Read More How can i add char_filter for a single field

Further aggregate date histogram in Elasticsearch query

I’m trying to extract, for each event_type, in how many days the event occurred and the last occurrence. Currently I wrote the following query: { "size": 0, "query": { … }, "_source": false, "aggregations": { "events": { "terms": { "field": "event_type" }, "aggs": { "event_timestamp": { "date_histogram": { "field": "@timestamp", "calendar_interval": "day", "min_doc_count": 1, "order":… Read More Further aggregate date histogram in Elasticsearch query

Raise error during bulk POST if an index document with identical _id already exists?

I can see that for non-bulk PUT operations this functionality exists, for the _id field, using "op_type" as explained in the API. So I tried this URL: https://localhost:9200/my_index/_bulk/?op_type=create and also https://localhost:9200/my_index/_bulk?op_type=create Both failed: "error": { "reason": "request [/my_index/_bulk/] contains unrecognized parameter: [op_type]", Is there any way to accomplish this? The request body is the bulk… Read More Raise error during bulk POST if an index document with identical _id already exists?

How do we query Elastic Search when there is a JSON object inside a nested type?

My mapping looks like: { "mappings": { "dynamic": "strict", "_meta": { "version": 9 }, "properties": { "__myVersion": { "type": "integer" }, "businessKey": { "type": "keyword" }, "businessStatus": { "type": "keyword" }, "candidateGroups": { "type": "keyword" }, "definitionCategory": { "type": "keyword" }, "definitionId": { "type": "keyword" }, "definitionKey": { "type": "keyword" }, "definitionName": { "type": "text",… Read More How do we query Elastic Search when there is a JSON object inside a nested type?

How To Filter Out List of Word from ElasticSearch Query Result?

context.analyzer("email_indexing_exact") .custom() .tokenizer("uax_url_email"); SearchSession searchSession = Search.session(entityManager); String[] fieldsArray = {"displayName", "email"}; String[] filterEmailArray = filterEmail.split(","); var query = searchSession.search(User.class) .extension(ElasticsearchExtension.get()) .select(ElasticsearchSearchProjectionFactory::source) .where(f -> f.bool() .must(f.match().fields(fieldsArray).matching(word).analyzer("autocomplete_search")) .mustNot(f.match().field("email").matching(filterEmailArray[0]).analyzer("email_indexing_exact")) ) .sort(f -> f.score().desc()); As you can see I only can filter out the 0th index of the array. How to filter out all of them? >Solution :… Read More How To Filter Out List of Word from ElasticSearch Query Result?

ElasticSearch new Java API print created quesy

I trying out the new Java Client for Elastic 8.1.1. In older versions i was able to print out the generated json query by using searchRequest.source(). I cannot find out actuallay what methode/service i can use do to so with the new client. My code looks: final Query range_query = new Query.Builder().range(r -> r.field("pixel_x") .from(String.valueOf(lookupDto.getPixel_x_min())).to(String.valueOf(lookupDto.getPixel_x_max())))… Read More ElasticSearch new Java API print created quesy