Re: getting different errors from complex phrase query

2020-06-16 Thread Erick Erickson
Check your “df” parameter in all your handlers in solrconfig.xml.

Second, add "=query” to the query and look at the parsed
return, you’ll probably see something field qualified by “text:….”

Offhand, though, I don’t see where that’s happening in your query.

wait, how are you submitting this? If the quote is getting to Solr
as an escaped character,  Solr is not be treating it as a phrase 
and the ‘by’ is independent of the “test*” in which case the “test*” 
would go  against the default search field, which I claim you have
defined as “text” with a “df” parameter in your request handler.

Best,
Erick 

> On Jun 15, 2020, at 11:19 PM, Shawn Heisey  wrote:
> 
> On 6/15/2020 2:52 PM, Deepu wrote:
>> sample query is
>> "{!complexphrase inOrder=true}(all_text_txt_enus:\"by\\ test*\") AND
>> (({!terms f=product_id_l}959945,959959,959960,959961,959962,959963)
>> AND (date_created_at_rdt:[2020-04-07T01:23:09Z TO *} AND
>> date_created_at_rdt:{* TO 2020-04-07T01:24:57Z]))"
>> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error
>> from server  https://XX.XX.XX:8983/solr/problem: undefined field text
> 
> The error is "undefined field text".  How exactly that occurs with what you 
> have sent, I do not know.  There is something defined somewhere that refers 
> to a field named "text" and the field does not exist in that index.
> 
> Something that may be indirectly relevant:  Generally speaking, Solr only 
> supports one "localparams" in a query, and it must be the first text in the 
> query string.  You have two -- one starts with {!complexphrase and the other 
> starts with {!terms.
> 
> There are some special circumstances where multiples are allowed, but I do 
> not know which circumstances.  For the most part, more than one isn't allowed 
> or supported.  I am pretty sure that you can't use multiple query parsers in 
> one query string.
> 
> Thanks,
> Shawn



Re: getting different errors from complex phrase query

2020-06-16 Thread Shawn Heisey

On 6/15/2020 2:52 PM, Deepu wrote:

sample query is
"{!complexphrase inOrder=true}(all_text_txt_enus:\"by\\ test*\") AND
(({!terms f=product_id_l}959945,959959,959960,959961,959962,959963)
AND (date_created_at_rdt:[2020-04-07T01:23:09Z TO *} AND
date_created_at_rdt:{* TO 2020-04-07T01:24:57Z]))"

org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error
from server  https://XX.XX.XX:8983/solr/problem: undefined field text


The error is "undefined field text".  How exactly that occurs with what 
you have sent, I do not know.  There is something defined somewhere that 
refers to a field named "text" and the field does not exist in that index.


Something that may be indirectly relevant:  Generally speaking, Solr 
only supports one "localparams" in a query, and it must be the first 
text in the query string.  You have two -- one starts with 
{!complexphrase and the other starts with {!terms.


There are some special circumstances where multiples are allowed, but I 
do not know which circumstances.  For the most part, more than one isn't 
allowed or supported.  I am pretty sure that you can't use multiple 
query parsers in one query string.


Thanks,
Shawn


getting different errors from complex phrase query

2020-06-15 Thread Deepu
Hi All,

i am trying to use {!complexphrasequeryparser inOrder=true} along with
other text fields. i am using solrj client to initiate the request.

sample query is
"{!complexphrase inOrder=true}(all_text_txt_enus:\"by\\ test*\") AND
(({!terms f=product_id_l}959945,959959,959960,959961,959962,959963)
AND (date_created_at_rdt:[2020-04-07T01:23:09Z TO *} AND
date_created_at_rdt:{* TO 2020-04-07T01:24:57Z]))"

org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error
from server  https://XX.XX.XX:8983/solr/problem: undefined field text

Please let me know what is wrong with my query.