None of these words - syntax


(Mark Evans) #1

i want to incorporate an additional textbox that allows users to choose words they want to have ignored in the results (like on google advanced search - none of these words)

is there a search filter / query option to handle this?

i would need to plug it in to the existing default search


(Mark Walkom) #2

Depends on how you are doing the initial query, but you can do NOT/- using simple query - https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html


(Mark Evans) #3

ok im utilising NEST within a C# project to do my search

so where i have -

a.Match(m => m.OnField("_all").Query(m_strSearchQuery))

  • to do my existing search....

how would i access the simple search query and flag option to add to this with my "none of these words" search string?


(system) #4