You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Wendy2 <we...@rcsb.org> on 2019/06/06 18:46:42 UTC
strange behavior
Hi,
Why "AND" didn't work anymore?
I use Solr 7.3.1 and edismax parser.
Could someone explain to me why the following query doesn't work any more?
What could be the cause? Thanks!
q=audit_author.name:Burley,%20S.K.%20AND%20entity.type:polymer
It worked previously but now returned very lower number of documents.
I had to use "fq" to make it work correctly:
q=audit_author.name:Burley,%20S.K.&fq=entity.type:polymer&rows=1
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: strange behavior
Posted by Wendy2 <we...@rcsb.org>.
Hi Shawn,
I see.
I added () and it works now. Thank you very much for your help!
q=audit_author.name:(Burley,%20S.K.)%20AND%20entity.type:polymer&rows=1
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: strange behavior
Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/6/2019 12:46 PM, Wendy2 wrote:
> Why "AND" didn't work anymore?
>
> I use Solr 7.3.1 and edismax parser.
> Could someone explain to me why the following query doesn't work any more?
> What could be the cause? Thanks!
>
> q=audit_author.name:Burley,%20S.K.%20AND%20entity.type:polymer
>
> It worked previously but now returned very lower number of documents.
> I had to use "fq" to make it work correctly:
>
> q=audit_author.name:Burley,%20S.K.&fq=entity.type:polymer&rows=1
That should work no problem with edismax. It would not however work
properly with dismax, and it would be easy to mix up the two query parsers.
The way you have written your query is somewhat ambiguous, because of
the space after the comma. That ambiguity exists in both of the queries
mentioned, even the one with the fq.
Thanks,
Shawn
Re: strange behavior
Posted by Wendy2 <we...@rcsb.org>.
Hi David,
I see. It fixed now by adding the (). Thank you so much!
q=audit_author.name:(Burley,%20S.K.)%20AND%20entity.type:polymer
--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
Re: strange behavior
Posted by David Hastings <ha...@gmail.com>.
audit_author.name:Burley,%20S.K.
translates to
audit_author.name:Burley, DEFAULT_OPERATOR DEFAULT_FIELD:S.K.
On Thu, Jun 6, 2019 at 2:46 PM Wendy2 <we...@rcsb.org> wrote:
>
> Hi,
>
> Why "AND" didn't work anymore?
>
> I use Solr 7.3.1 and edismax parser.
> Could someone explain to me why the following query doesn't work any
> more?
> What could be the cause? Thanks!
>
> q=audit_author.name:Burley,%20S.K.%20AND%20entity.type:polymer
>
> It worked previously but now returned very lower number of documents.
> I had to use "fq" to make it work correctly:
>
> q=audit_author.name:Burley,%20S.K.&fq=entity.type:polymer&rows=1
>
>
>
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>