Questions tagged [match-phrase]

69 questions
0
votes
1 answer

How to use match_phrase with constant_score, terms

This is my query in symfony2. I want to add here "match_phrase", but anywhere i add that, I get errors. $params = [ 'index' => 'articles_v2', 'type' => 'article', 'body' => [ "sort" => [ [ "date" => …
0
votes
1 answer

How do I search for a phrase and a keyword at the same time in mongodb?

Basically I'm going through a large yelp database in my mongodb, and I want to find all reviews with the phrase hot wings and keyword discount. But I can't create the right query that will look for the review that has the phrase hot wings AND the…
NewSQLguy
  • 53
  • 8
0
votes
1 answer

SQL: full-text search does not work if search phrase has number inside?

My search phrase is "test doc". I have a query with full-text search phrase like this: SELECT doc.iEntityId, doc.strName, doc.iHandbookId FROM m136_tblDocument doc WHERE iLatestApproved = 1 AND doc.iDeleted = 0 AND ( (CONTAINS(doc.strName, '"test…
jack.pop
  • 683
  • 2
  • 6
  • 21
0
votes
1 answer

Elasticsearch query for multi-word search suggestions

I'm currently using this ES query for search suggestion from ES (using edge n grams) var terms = query.split(' '), baseTerms = terms.length === 1 ? '' : terms.slice(0, -1).join(' ') + ' ', lastTerm = terms[terms.length -…
user3125823
  • 1,846
  • 2
  • 18
  • 46
0
votes
1 answer

How to boost a phrase matching but just in certain field?

I want to boost a query if its by match phrasing but I want it to search only in a certain field. So far I have the following query { "query": { "bool": { "should": [ { "match_phrase": { "_all": { …
Diego Aguado
  • 1,604
  • 18
  • 36
0
votes
1 answer

Elasticsearch pruned suggestions

Anyone know how to filter misspellings from the suggest result set? This query finds good suggestions but also includes partial misspellings. e.g. "comercial morgage" returns "commercial mortgage", which is good, but also "comercial mortgage",…
Tim
  • 435
  • 1
  • 4
  • 12
-1
votes
2 answers

Query string in elastic search

Am searching elastic search with the below match query, which is not giving me the exact match instead its giving some more irrevalant match also. am using elastic search 6.3 Please find my query below GET /_search { "must":{ …
revathi
  • 1
  • 1
  • 2
-1
votes
1 answer

Elasticsearch match multiple values and output result should be in same sequence of array element with sorting applied

I have an elastic search query: { "query": { "bool": { "should": [ {'match_phrase': {'unique_chat_session_id': '1a8905a2-b328-4f57-8ce8-7ba2e43e138e'}}, {'match_phrase': {'unique_chat_session_id':…
Tejas
  • 1
  • 3
-1
votes
1 answer

Searching for specific phrase pattern within lines. python

I have made certain rules that I need to search for in a file. These rules are essentially phrases with an unknown number of words within. For example, mutant...causes(...)GS Here, this a phrase, which I want to search for in my file. The ...…
user5077886
1 2 3 4
5