0

I am using http solr server and solrj both version 4.3.1. Now i have got problem with operator AND in my filter query so for example this is my query log :

path=/select params={start=1&q=file_content:hello*&wt=javabin&fq=file_create_user:\-1+AND+file_parents_folder:\(341\+AND\+4222\)&version=2&rows=25} status=400 QTime=2

And i have got exception:

Caused by: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Invalid Number: (341 AND 4222)

Whats is wrong in my filter query ? file_parents_folder is multi valued field.

Łukasz Woźniczka
  • 1,625
  • 3
  • 28
  • 51

1 Answers1

0

I think you have a couple of options here:

  1. Wrap the filter query in parentheses

    fq=\(file_create_user:\-1+AND+file_parents_folder:\(341\+AND\+4222\)\)

  2. You can specify the &fq parameter multiple times.

    fq=file_create_user:\-1&fq=file_parents_folder:\(341\+AND\+4222\)

Paige Cook
  • 22,415
  • 3
  • 57
  • 68
  • I try to add breakes so now this is my query : path=/select params={start=1&q=file_content:hello*&wt=javabin&fq=(file_create_user:\-1+AND+file_parents_folder:\(341\+AND\+4261\))&version=2&rows=25} status=400 QTime=11. But i still have got the same error – Łukasz Woźniczka Aug 03 '13 at 08:22