Issue with Elastic search data


(Ram Sunka) #1

Hi, I am just new to elastic search. Recently, I have tried executing the below query
{
"from": 0,
"size": 1,
"query": {
"bool": {
"must": [
{
"match": {
"receiver": {
"query": "AN",
"type": "boolean"
}
}
}
]
}
}
}

When I run this query, not showing the hits. I am sure the document is exists in Elastic search.

Elastic search version is : 1.3.2
Note : if i replace with "AN" with other valid value, it shows the hits. Any one can help me here please. Thank you.


(Mark Walkom) #2

How do you know there is data that matches then?

You should really upgrade as a matter of urgency.


(Ram Sunka) #3

Thank you for your reply Warkolm.

Actually, Document is having below two fields:

  1. receiver (With value as AN)
    2.receiver_company(With value as AN RailXXX)

When i search with receiver_company, i could see the receiver value as AN in the output. Here is the query:
{
“from”: 0,
“size”: 1,
“query”: {
“bool”: {
“must”: [
{
“match”: {
“receiver_company”: {
“query”: “AN RailXXX”,
“type”: “boolean”
}
}
}
]
}
}
}

So, Why i could not able to search with the field as receiver and the value as AN. Here is the query:
{
“from”: 0,
“size”: 1,
“query”: {
“bool”: {
“must”: [
{
“match”: {
“receiver”: {
“query”: “AN”,
“type”: “boolean”
}
}
}
]
}
}
}


(Mark Harwood) #4

See https://www.elastic.co/guide/en/elasticsearch/guide/current/stopwords.html


(Ram Sunka) #5

Thank you Mark.

But, What is process to make AN as searchable? I am using elastic version 1.3.2


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.