Questions tagged [elasticsearch-java-api]

281 questions
0
votes
1 answer

Phrase matching over multiple fields

Here is how I do it now: .. .setQuery( filteredQuery( multiMatchQuery(String.format("*%s*", query), "name", "address", "phone") .type(MultiMatchQueryBuilder.Type.CROSS_FIELDS), geoDistanceFilter("location") …
nKognito
  • 6,297
  • 17
  • 77
  • 138
0
votes
0 answers

Elastic search java client. Initialisation of TransportClient takes long time

Why does default initialisation of TransportClient() for elasticsearch takes much more time then initialisation of jest client? Code for TransportClient: private static Client client = new TransportClient() .addTransportAddress( …
0
votes
1 answer

How to determine if a connection has been established with elasticsearch + Java API?

I'm very new to elasticsearch and the Java API. How do I determine if I've established a successful connection to elasticsearch with the API? I'd normally expect a response from the server... Code Client client = new TransportClient() …
0
votes
1 answer

ElasticSearch Lucene full text search using Java API

I've recently started using ElasticSearch. I've managed to integrate them successfully, but I find the search API rather complex and confusing. The Java API is not too helpful either. How is it possible to search the following JSON for the fieldname…
Jay
  • 471
  • 1
  • 4
  • 11
0
votes
1 answer

regarding elastic search nested filter

I have the below mapping, { "wms": { "mappings": { "item": { "properties": { "barcode": { "type": "string" }, "comments": { "type": "string" }, "id": { …
0
votes
0 answers

Elasticsearch: can I set highlight string in Java client?

I am new to Elasticsearch. I am able to run the following query in Windows prompt: { "query": { "filtered": { "query": { "term": { "title": "crime" } }, "filter": { "term": { …
curious1
  • 14,155
  • 37
  • 130
  • 231
-1
votes
1 answer

Trying to search "a-test" using elasticsearch 7.4

I have a search functionality implemented and i am trying to search string that contains "." or "-" e.g a-test or a.test Can you please how to do it as my existing query is not helping…
-1
votes
1 answer

searching for a word in a string indexed field in elasticsearch java

I have a String field countries of format eg "SS,SX,US,IND,CND,TN" and I have a input String field countryCode which will be of form "SS". How can I query all the records where a given countryCode is in countries in elasticsearch? I have tried with…
-1
votes
1 answer

Error while updating nested field

Hi i am using elasticsearch java API for updating a document with script. But i am getting below exception Exception in thread "main" MapperParsingException[object mapping for [content] tried to parse field [content] as object, but found a concrete…
Raguram
  • 13
  • 2
-2
votes
1 answer

How to insert document to an index in elasticsearch without specifying document id using java apis?

I'm new to Elastic search and I'm doing a task in which I need to upload more number of documents to ES. Whenever I upload everytime, I need to specify document id for that document in IndexRequest api. Is there any way in java so that i can insert…
1 2 3
18
19