Query: URl too long

2010-07-12 Thread Frederico Azeiteiro
Hi,

 

I need to perform a search using a list of values (about 2000).

 

I'm using SolrNET QueryInList function that creates the searchstring
like:

 

fieldName: value1 OR fieldName: value2 OR fieldName: value3... (2000
values)

 

This method created a string with about 100 000 chars and the Web
Request fails with URI too long (C#).

 

I'm trying to update an old Lucene app that performs this kind of
searches. 

How can I achieve this with Solr?

 

What are my options here?

 

Thank you,

Frederico



Re: Query: URl too long

2010-07-12 Thread Chantal Ackermann
Hi Frederico,

not sure about solrNET, but changing the http method from GET to POST
worked for me (using SolrJ).

Chantal

On Mon, 2010-07-12 at 12:18 +0200, Frederico Azeiteiro wrote:
 Hi,
 
  
 
 I need to perform a search using a list of values (about 2000).
 
  
 
 I'm using SolrNET QueryInList function that creates the searchstring
 like:
 
  
 
 fieldName: value1 OR fieldName: value2 OR fieldName: value3... (2000
 values)
 
  
 
 This method created a string with about 100 000 chars and the Web
 Request fails with URI too long (C#).
 
  
 
 I'm trying to update an old Lucene app that performs this kind of
 searches. 
 
 How can I achieve this with Solr?
 
  
 
 What are my options here?
 
  
 
 Thank you,
 
 Frederico





Re: Query: URl too long

2010-07-12 Thread Ahmet Arslan
 I'm using SolrNET QueryInList function that creates the
 searchstring
 like:
 
  
 
 fieldName: value1 OR fieldName: value2 OR fieldName:
 value3... (2000
 values)
 
  
 
 This method created a string with about 100 000 chars and
 the Web
 Request fails with URI too long (C#).

Not sure about SolrNet but you can use POST method instead of GET or configure 
maxHttpHeaderSize setting of your servlet container. For example for tomcat
http://wiki.apache.org/solr/SolrTomcat#Enabling_Longer_Query_Requests


  


Re: Query: URl too long

2010-07-12 Thread Jon Poulton
Hi there,
We had a similar issue. It's an easy fix, simply change the request type from 
GET to POST. 

Jon

On 12 Jul 2010, at 11:18, Frederico Azeiteiro wrote:

 Hi,
 
 
 
 I need to perform a search using a list of values (about 2000).
 
 
 
 I'm using SolrNET QueryInList function that creates the searchstring
 like:
 
 
 
 fieldName: value1 OR fieldName: value2 OR fieldName: value3... (2000
 values)
 
 
 
 This method created a string with about 100 000 chars and the Web
 Request fails with URI too long (C#).
 
 
 
 I'm trying to update an old Lucene app that performs this kind of
 searches. 
 
 How can I achieve this with Solr?
 
 
 
 What are my options here?
 
 
 
 Thank you,
 
 Frederico
 



RE: Query: URl too long

2010-07-12 Thread Frederico Azeiteiro
Hi,

A closer look shows that the problem is not on the request but on the
creation of the URI object.

The exception is sent when trying to access the URI object inside the
URIbuilder.

Trying to google it but without luck...


-Original Message-
From: Jon Poulton [mailto:jon.poul...@vyre.com] 
Sent: segunda-feira, 12 de Julho de 2010 11:56
To: solr-user@lucene.apache.org
Subject: Re: Query: URl too long

Hi there,
We had a similar issue. It's an easy fix, simply change the request type
from GET to POST. 

Jon

On 12 Jul 2010, at 11:18, Frederico Azeiteiro wrote:

 Hi,
 
 
 
 I need to perform a search using a list of values (about 2000).
 
 
 
 I'm using SolrNET QueryInList function that creates the searchstring
 like:
 
 
 
 fieldName: value1 OR fieldName: value2 OR fieldName: value3... (2000
 values)
 
 
 
 This method created a string with about 100 000 chars and the Web
 Request fails with URI too long (C#).
 
 
 
 I'm trying to update an old Lucene app that performs this kind of
 searches. 
 
 How can I achieve this with Solr?
 
 
 
 What are my options here?
 
 
 
 Thank you,
 
 Frederico
 



RE: Query: URl too long

2010-07-12 Thread Frederico Azeiteiro
Yes, i guess i can't create an URI object that long.

Can someone remember other options?
I'm thinking about options avoiding the http request... 

My best try is using lucene again but keep the solr for indexing.

Do you thing this is a good aproach? 



-Original Message-
From: Frederico Azeiteiro [mailto:frederico.azeite...@cision.com] 
Sent: segunda-feira, 12 de Julho de 2010 12:10
To: solr-user@lucene.apache.org
Subject: RE: Query: URl too long

Hi,

A closer look shows that the problem is not on the request but on the
creation of the URI object.

The exception is sent when trying to access the URI object inside the
URIbuilder.

Trying to google it but without luck...


-Original Message-
From: Jon Poulton [mailto:jon.poul...@vyre.com] 
Sent: segunda-feira, 12 de Julho de 2010 11:56
To: solr-user@lucene.apache.org
Subject: Re: Query: URl too long

Hi there,
We had a similar issue. It's an easy fix, simply change the request type
from GET to POST. 

Jon

On 12 Jul 2010, at 11:18, Frederico Azeiteiro wrote:

 Hi,
 
 
 
 I need to perform a search using a list of values (about 2000).
 
 
 
 I'm using SolrNET QueryInList function that creates the searchstring
 like:
 
 
 
 fieldName: value1 OR fieldName: value2 OR fieldName: value3... (2000
 values)
 
 
 
 This method created a string with about 100 000 chars and the Web
 Request fails with URI too long (C#).
 
 
 
 I'm trying to update an old Lucene app that performs this kind of
 searches. 
 
 How can I achieve this with Solr?
 
 
 
 What are my options here?
 
 
 
 Thank you,
 
 Frederico
 



RE: Query: URl too long

2010-07-12 Thread Ahmet Arslan
 Yes, i guess i can't create an URI
 object that long.
 
 Can someone remember other options?

You can shorten your String by not repeating OR and fieldName. e.g.

fieldName: value1 OR fieldName: value2 OR fieldName: value3...

q=value1 value2 value3q.op=ORdf=fieldName

By the way how are you generating these value1 value2 etc? If the above does 
not solve your problem you can embed this logic into a custom SearchHandler.


  


Re: Query: URl too long

2010-07-12 Thread kenf_nc

Frederico, 
You should also pose your question on the SolrNet forum,
http://groups.google.com/group/solrnet?hl=en
Switching from GET to POST isn't a Solr issue, but a SolrNet issue.
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Query-URl-too-long-tp959990p960208.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Query: URl too long

2010-07-12 Thread Frederico Azeiteiro
Not an option because the query has other fields to query also.
They are generated throw a list choices (that could go to 5000's string
with 7 char each..).

I don't know is this could be considered off-topic (please advise...)
but:

i'm doing some test with lucene (Lucene.Net 2.9.2) but the results with
date range queries are not similar (0 hits on Lucene, 900 with Solr).
Does lucene supports date range queries?

Thank you for your help.

-Original Message-
From: Ahmet Arslan [mailto:iori...@yahoo.com] 
Sent: segunda-feira, 12 de Julho de 2010 13:16
To: solr-user@lucene.apache.org
Subject: RE: Query: URl too long

 Yes, i guess i can't create an URI
 object that long.
 
 Can someone remember other options?

You can shorten your String by not repeating OR and fieldName. e.g.

fieldName: value1 OR fieldName: value2 OR fieldName: value3...

q=value1 value2 value3q.op=ORdf=fieldName

By the way how are you generating these value1 value2 etc? If the above
does not solve your problem you can embed this logic into a custom
SearchHandler.


  


Re: Query: URl too long

2010-07-12 Thread Mauricio Scheffer
Frederico,
This is indeed a SolrNet issue. You can switch to POST in queries by
implementing a ISolrConnection decorator. In the Get() method you'd build a
POST request instead of the standard GET.
Please use the SolrNet forum for further questions about SolrNet.

Cheers,
Mauricio

On Mon, Jul 12, 2010 at 9:33 AM, kenf_nc ken.fos...@realestate.com wrote:


 Frederico,
 You should also pose your question on the SolrNet forum,
 http://groups.google.com/group/solrnet?hl=en
 Switching from GET to POST isn't a Solr issue, but a SolrNet issue.
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/Query-URl-too-long-tp959990p960208.html
 Sent from the Solr - User mailing list archive at Nabble.com.



RE: Query: URl too long

2010-07-12 Thread Frederico Azeiteiro
Ok, I posted on SOLRNet forum asking how can I reduce the URL string
using POST method.

But I'm giving a try to SOLRJ. Think should be the right way to do it
maybe.


-Original Message-
From: Mauricio Scheffer [mailto:mauricioschef...@gmail.com] 
Sent: segunda-feira, 12 de Julho de 2010 14:31
To: solr-user@lucene.apache.org
Subject: Re: Query: URl too long

Frederico,
This is indeed a SolrNet issue. You can switch to POST in queries by
implementing a ISolrConnection decorator. In the Get() method you'd
build a
POST request instead of the standard GET.
Please use the SolrNet forum for further questions about SolrNet.

Cheers,
Mauricio

On Mon, Jul 12, 2010 at 9:33 AM, kenf_nc ken.fos...@realestate.com
wrote:


 Frederico,
 You should also pose your question on the SolrNet forum,
 http://groups.google.com/group/solrnet?hl=en
 Switching from GET to POST isn't a Solr issue, but a SolrNet issue.
 --
 View this message in context:

http://lucene.472066.n3.nabble.com/Query-URl-too-long-tp959990p960208.ht
ml
 Sent from the Solr - User mailing list archive at Nabble.com.