query too long / has-many relation

2009-09-09 Thread Cain Jones
Hi all,

I am pretty fresh to solr and I have encountered a problem.

In short:

Is there a way to configure Solr to accept POST queries (instead of GET
only?).
Or: is there some other way to make Solr accept queries longer than 2,000
characters? (Up to 10,000 would be nice)


Longer version:

I have a Solr 1.3 index (served by Tomcat) of People, containing id, name,
address, description etc. This works fine.
Now I want to store and retrieve Events (time location, person), so each
person has 0 or more events.
As I understood it, there is no way to model a has-many relation in Solr (at
least not between two structures with more than 1 properties), so I decided
to store the Events in a separate mysql table.
An example of a query I would like to do is: give me all people that will
have an Event on location x coming month, that have  in their
description.
I do this in two steps now: first I query the mysql table, then I build a
solr query, with a big OR of all the ids.
The problem is that this can generate long (too long) querystrings.


Thanks in advance,
Cain Jones


Re: query too long / has-many relation

2009-09-09 Thread Cain Jones
I had some trouble with maxBooleanClauses -- I have to set it twice the size
I would expect.
But apart from that everything works fine now (10,000 OR clauses takes 10
seconds).

Thank you Alexey.


On Wed, Sep 9, 2009 at 1:19 PM, Alexey Serba  wrote:

> >> Is there a way to configure Solr to accept POST queries (instead of GET
> >> only?).
> >> Or: is there some other way to make Solr accept queries longer than
> 2,000
> >> characters? (Up to 10,000 would be nice)
> > Solr accepts POST queries by default. I switched to POST for exactly
> > the same reason. I use Solr 1.4 ( trunk version ) though.
> Don't forget to increase maxBooleanClauses in solrconfig.xml
>
> http://wiki.apache.org/solr/SolrConfigXml#head-69ecb985108d73a2f659f2387d916064a2cf63d1
>