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 Marian Steinbach <ma...@gmail.com> on 2011/07/12 15:26:58 UTC

POST for queries, length/complexity limit of fq?

Hi!

I am going to propose a concept where pretty long and complex filter
query (fq) parameters can occur. They are used to enforce permissions
so that a user sees only those documents which he has permissions for.

1. I assume that it's worthwhile to rely on POST method instead of GET
when issuing a search. Right? As I can see, this should work.

2. Is there a limit on the length of the fq value or on the level of
brace nestings? Are there serious performance drawbacks to take into
consideration?

3. Does filter caching work granular, or does it always take into
consideration the complete fq term? I.e. if someone searches with
"fq=(category:1 AND tag:foo)" and then  searches for
"fq=(category:1)", does the second request benefit from the first
being cached?

As soon as possible, I will try things for myself, but if there is
someone here with enough experience to answer any of these questions,
I'd be glad to know upfront.

Thank you very much!

Marian

Re: POST for queries, length/complexity limit of fq?

Posted by Sujatha Arun <su...@gmail.com>.
I have used   long fq  with POST for persmission of the type fq= id:( 1...n)
and they are limited by the MAX boolean Clause Exception in the
solrconfig.xml.

Regards
Sujatha
On Wed, Jul 13, 2011 at 4:40 PM, pravesh <su...@yahoo.com> wrote:

> >1. I assume that it's worthwhile to rely on POST method instead of GET
> when issuing a search. Right? As I can see, this should work.
>
> We do restrict users search by passing unique id's(sometimes in thousands)
> in 'fq' and use POST method
>
> Thanx
> Pravesh
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/POST-for-queries-length-complexity-limit-of-fq-tp3162405p3165586.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: POST for queries, length/complexity limit of fq?

Posted by pravesh <su...@yahoo.com>.
>1. I assume that it's worthwhile to rely on POST method instead of GET
when issuing a search. Right? As I can see, this should work. 

We do restrict users search by passing unique id's(sometimes in thousands)
in 'fq' and use POST method

Thanx
Pravesh

--
View this message in context: http://lucene.472066.n3.nabble.com/POST-for-queries-length-complexity-limit-of-fq-tp3162405p3165586.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: POST for queries, length/complexity limit of fq?

Posted by Marian Steinbach <ma...@sendung.de>.
Thanks for the reply!

I got a followup question: Can I customize Tomcat logging so that the
"fq" value is not logged?

Marian


On Tue, Jul 12, 2011 at 15:34, Ahmet Arslan <io...@yahoo.com> wrote:
> ...
>
> Yes it accepts both GET and POST.
>
> http://wiki.apache.org/solr/SolrTomcat#Enabling_Longer_Query_Requests
>
> I think some users choose to construct similar long fq's inside solr.
>
>...
>
> It takes into consideration the complete fq term.
>

Re: POST for queries, length/complexity limit of fq?

Posted by Ahmet Arslan <io...@yahoo.com>.
> I am going to propose a concept where pretty long and
> complex filter
> query (fq) parameters can occur. They are used to enforce
> permissions
> so that a user sees only those documents which he has
> permissions for.
> 
> 1. I assume that it's worthwhile to rely on POST method
> instead of GET
> when issuing a search. Right? As I can see, this should
> work.

Yes it accepts both GET and POST. 

http://wiki.apache.org/solr/SolrTomcat#Enabling_Longer_Query_Requests

I think some users choose to construct similar long fq's inside solr.

> 3. Does filter caching work granular, or does it always
> take into
> consideration the complete fq term? I.e. if someone
> searches with
> "fq=(category:1 AND tag:foo)" and thenĀ  searches for
> "fq=(category:1)", does the second request benefit from the
> first
> being cached?

It takes into consideration the complete fq term.