btw, is there any difference if the fq field is a string field vs test field?
On Wed, Jul 11, 2018 at 11:59 AM, Wei <weiwan...@gmail.com> wrote: > Thanks Erick and Andrea! If my default operator is OR, fq= > my_text_field:(Jurassic park the movie) is equivalent to > my_text_field:(Jurassic > OR park OR the OR movie)? That make sense. > > On Wed, Jul 11, 2018 at 9:06 AM, Andrea Gazzarini <a.gazzar...@sease.io> > wrote: > >> The syntax is valid in all those three examples, the right one depends on >> what you need. >> >> The first query executes a proximity search (you can think to a phrase >> search, for simplicity) so it returns no result because probably you don't >> have any matching docs with that whole literal. >> >> The second is querying the my_text_field for all terms which compose the >> value between parenthesis. You can think to a query where each term is an >> optional clause, something like mytextfield:jurassic OR >> mytextfiekd:park... >> (it's not exactly an OR but this could give you the idea= >> >> The third example is not doing what you think. My_text_field is used only >> with the first term (Jurassic) while the others are using the default >> field. Something like mytextfield:jurassic OR defaultfield:park OR >> defaultfield:the.... That's the reason you have so many results (I guess >> the default field is a catch-all field) >> >> Sorry for typos I'm using my mobile >> >> Andrea >> >> Il mer 11 lug 2018, 17:54 Wei <weiwan...@gmail.com> ha scritto: >> >> > Hi, >> > >> > I am running filter query on a field of text_general type and see >> > completely different results for the following queries: >> > >> > fq= my_text_field:"Jurassic park the movie" returns 0 >> > result >> > >> > fq= my_text_field:(Jurassic park the movie) returns 20 >> > result >> > >> > fq= my_text_field:Jurassic park the movie returns >> > thousands of results >> > >> > >> > Which one is the correct syntax? I am confused why the first query >> doesn't >> > have any match at all. I also thought 2 and 3 are the same, but turns >> out >> > quite different. >> > >> > >> > Thanks, >> > Wei >> > >> > >