Questions tagged [match-phrase]
69 questions
1
vote
2 answers
Elasticsearch exact phrase match on JSON
I am working on exact phrase match from a json field using the elasticsearch. I have tried mutiple syntax like multi_match, query_string & simple_query_string but they does not return results exactly as per the given phrase.
query_string syntax that…

Muhammad Muzammil
- 23
- 4
1
vote
2 answers
ElasticSearch - Phrase match on whole document? Not just one specific field
Is there a way I can use elastic match_phrase on an entire document? Not just one specific field.
We want the user to be able to enter a search term with quotes, and do a phrase match anywhere in the document.
{
"size": 20,
"from": 0,
…

Allen H.
- 318
- 6
- 19
1
vote
1 answer
Elasticsearch 6.8 match_phrase search N-gram tokenizer works not well
i use Elasticsearch N-gram tokenizer and use match_phrase to fuzzy match
my index and test data as below:
DELETE /m8
PUT m8
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "my_tokenizer"
…

Rollsbean
- 715
- 2
- 11
- 31
1
vote
1 answer
how to use multiple match phrases in must with or condition in elastic search?
how to use multiple match phrases in must with or condition in elastic search?
GET questiondetails/question/_search
{
"query": {
"bool": {
"should": [
{
"match_phrase": {
"tags.keyword": "azure-data"
…

JhansiRani Kolapalli
- 23
- 9
1
vote
0 answers
how to add conditional statement to Personal list?
Currently I have this formula which combines cells values together and combines them to copy and paste into a document.
=IF(G2="","",J2&CHAR(10)&K2&CHAR(10)&L2&CHAR(10)&G2&" / "&H2&CHAR(10)&T2&"/ LOC NA "&O2&CHAR(10)&N2&" "&M2&CHAR(10)&"POST…

NOTaGURU
- 11
- 2
1
vote
0 answers
ElasticSearch Match_Phrase Query not full text match
I used match_phrase query for search full text matching.
But it did not work as I thought.
Does match_phrase query not work with text type?
My query:
GET my_index/_search
{
"query": {
"match_phrase" : {
"message" :…

rlawlstjd007
- 55
- 7
1
vote
2 answers
Elasticsearch match_phrase for multiple fields
I am new to Elasticsaerch and I am struggling right now. I am trying to search for all data, that have exact phrase in field eset. My query looks like this and it works:
{
"query" : {
"match_phrase" : {
"eset": "Win32/Kryptik.DLT"
…

Tomas Lukac
- 1,923
- 2
- 19
- 37
1
vote
0 answers
Phrase query in elasticsearch considers docFreq for each component word?
I'm searching for a phrase in a corpus of documents (using elasticsearch 5.5.1) that includes annual company reports. I'm searching for a phrase, the query context looks like the following:
"query": {
"bool": {
"should": [{ "match_phrase":…

Tuhin
- 11
- 1
1
vote
3 answers
Ignore filtered words from the query string when using phrase match in Elasticsearch
I'm using a custom index analyzer to remove a certain set of stop words. I'm then making phrase match queries with text that includes some of the stop words. I would expect that the stop words get filtered out of the query, however they are not (and…

Topher
- 596
- 4
- 15
1
vote
0 answers
Elastic Search Match_phrase not giving deterministic result
I have defined mapping in following way.
PUT _template/name
"mappings": {
"_default_": {
"name": {
"type": "string",
"analyzer" : "synonyms_expand",
"index" : "analyzed",
…

Onkar Kundargi
- 341
- 1
- 3
- 5
1
vote
1 answer
How to get Elasticsearch boolean match working for multiple fields
I need some expert guidance on trying to get a bool match working. I'd like the query to only return a successful search result if both 'message' matches 'Failed password for', and 'path' matches '/var/log/secure'.
This is my query:
curl -s -XGET…

Dominic Nicholas
- 11
- 2
0
votes
0 answers
Elastic search query migration from 1.x to 7.x for matching phrases
I have a requirement to modify elastic search query from 1.x to 7.x. The 1.x query is given below:
{
"query": {
"filtered": {
"filter": {
"and": {
"filters": [
{
"terms": {
…

Vithursa Mahendrarajah
- 1,194
- 2
- 15
- 28
0
votes
1 answer
Terms and multi match search query for elasticsearch golang
I have a situation where I need to do elastic search based on multi-match.
case 1: phrase search for keywords field. should return the results on complete phrase match only(Should not split the phrase).
case 2: for remaining fields 1 keyword match…
0
votes
0 answers
Elastic Search match phrase prefix query not returning data if Value having 2 character word
I am facing issue in elastic search to find some data with match phrase prefix query.
If I have value of field is "shany shores egyptian sa 0976", which I am searching with.
If I will search this field with whole string "shany shores egyptian sa…

Sudam Jadhav
- 1
- 5
0
votes
2 answers
Count number of times a phrase is near another phrase, within n# of words of each other
I need to count the number of times a specific phrase occurs within 3 words of another specific phrase, per row of a dataframe string. Order does not matter.
To illustrate: X = "black cat", Y = "is my", proximity distance = 3, and String = "The…

tshobe
- 19
- 1
- 7