Re: Solr filter query on STRING field [Was:Re: solr filter query on text field]

2018-10-24 Thread Alexandre Rafalovitch
First one treats space as end of operation, so the second keyword is searched against default field (id). Try putting the whole thing into the quotes. Or use Field Query Parser: https://lucene.apache.org/solr/guide/7_5/other-parsers.html#field-query-parser Regards, Alex. On Wed, Oct 24, 2018,

Solr filter query on STRING field [Was:Re: solr filter query on text field]

2018-10-24 Thread Marek Tichy
Hi, I'm having troubles with the filter query on a multiple string field, specifically with a space between words. Looking at the histogram and values using Solr UI it correctly shows that the indexing stores the string "Key case" as it should. However the following filter queries: fq=sm_field_ta

Re: solr filter query on text field

2018-07-11 Thread Erick Erickson
bq. is there any difference if the fq field is a string field vs test Absolutely. string fields are not analyzed in any way. They're not tokenized. There are case sensitive. Etc. For example takd My dog as input. A string field will have a _single_ token "My dog.". It will not match a search on "

Re: solr filter query on text field

2018-07-11 Thread Wei
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 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 mov

Re: solr filter query on text field

2018-07-11 Thread Wei
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 wrote: > The syntax is valid in all those three examples, th

Re: solr filter query on text field

2018-07-11 Thread Andrea Gazzarini
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

Re: solr filter query on text field

2018-07-11 Thread Erick Erickson
1> is looking for the _phrase_, so the four tokens "jurassic" "park" "the" "movie" have to appear next to each other in that order. 2> is looking for the four tokens anywhere in the field. Whether they _all_ must appear depends on whether the default operator (OR or AND). 3> is parsed as my_text_

solr filter query on text field

2018-07-11 Thread Wei
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_te