Edit New issue search exact value in hole type

(maral) #1

i want to search in my type..
and wrote all my queries, and work fine.. here i have a challenge!
i want to search in hole type... any field that exist, i wrote a query like this :

"query" => [
  "bool" => [    
         "must" => [
                 "query_string" => [
                         "query" => $keyword_exact,
                          "boost" => 1


it works, but i want to get documents with the exact query...
for example: if i search sales... i want this exact word, not 'resalat' or 'Assaluyeh' or... because of having letters 'sal' .

this was my issue,
i hope it's clear for you
and thanks

(Zachary Tong) #2

I suggest you start working through Mapping and Anlaysis chapter of the Definitive Guide. You'll need to learn about how to properly map, analyze and search fields so that you can differentiate between exact values and partial matches.

That chapter walks through the theory behind it :slight_smile:

(system) #3

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