solrj and multiple slaves

2008-02-06 Thread Keene, David
Hey guys,

 

I have a quick question about using solrj to connect to multiple slaves.
My application is deployed on multiple boxes that have to talk to
multiple solr slaves.  In order to take advantage of the queryResult
cache, each request from one of my app boxes should be redirected to the
same solr slave.

 

I'm using an apache to load balance between the slaves using sticky
sessions with jk2 (jsessionId cookie).  Is this the right way to go
about loadbalancing multiple solr slaves when using solrj? If so, should
I look into making a patch for solrj so that each query can optionally
take a cookie parameter so the underling HttpClient knows what
jsessionId to attach to the request?

 

On the other hand.. I could be going about this all wrong.

Thanks,

Dave

 

 



RE: question about bi-gram analysis on query

2007-10-06 Thread Keene, David
Hi Otis!

Yes, I've run the query though debugQuery=yes.  I posted the difference between 
the debug output and the Luke parsed query in my original post.  here's a 
snippet:


Also, I've noticed that the parsed query on luke is:
text:美聯 聯社
and in solr it is:
text:美聯 聯社 
I noticed there is an extra space in the solr parsed query.  I don't know if 
that makes a difference.


Like I said, the space in there is the only difference between my parsed query 
in Luke and the debug query output .  I even stepped though the response in 
solr with eclipse, and confirmed that the parsed query was tokenenized properly 
(bigram), but had that extra space in there.

On the analysis page, I see hits come up in the text fine, but nothing on a 
search from the main page.

Thanks,
Dave


-Original Message-
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 05, 2007 11:51 PM
To: solr-user@lucene.apache.org
Subject: Re: question about bi-gram analysis on query

Dave,

Have you tried using debugQuery=true ? :)

Otis
 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simpy -- http://www.simpy.com/  -  Tag  -  Search  -  Share

- Original Message 
From: Keene, David [EMAIL PROTECTED]
To: Teruhiko Kurosaka [EMAIL PROTECTED]
Cc: solr-user@lucene.apache.org
Sent: Thursday, October 4, 2007 4:44:59 PM
Subject: RE: question about bi-gram analysis on query

Hi,

Thanks for responding.  I should have been clearer..

By actual search I meant hitting the search demo page on the solr admin page. 
 So I get no results on this query:

/solr/select/?q=%E7%BE%8E%E8%81%AFversion=2.2start=0rows=10indent=on

But the same query (with the data in my index) on the analysis page shows me a 
hit (and the same search in Luke gets me a hit too).

I've tried this on 1.1, 1.2 and nightly as of yesterday. I assume that I am 
missing something really obvious..

-Dave


-Original Message-
From: Teruhiko Kurosaka [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 04, 2007 12:44 PM
To: Keene, David
Cc: solr-user@lucene.apache.org
Subject: RE: question about bi-gram analysis on query

Hello David,
 And if I do a search in Luke and the solr analysis page 
 for美聯, I get a hit.  But on the actual search, I don't.

I think you need to tell us what you mean by actual search
and your code that interfaces with Solr.

-kuro





RE: Merging Fields

2007-10-05 Thread Keene, David
Jae,

The easiest way to do this is with CopyField.  

These entries in your schema will accomplish that:

field name=field3 type=String indexed=true stored=false
multiValued=true/

copyField source=field1 dest=field3/
copyField source=field2 dest=field3/


Field 3 will have the tokens from both field 1 and 2 in it.

If you want to merge those 2 fields for display, I would just concat
them at display time.

Dave



-Original Message-
From: Jae Joo [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 05, 2007 9:22 AM
To: solr-user
Subject: Merging Fields

Is there any way to merge fields  during indexing time.

I have field1 and field2 and would like to combine these fields and make
field3.
In the document, there are field1 and field2, and I may build field3
using
CopyField.

Thanks,

Jae


RE: question about bi-gram analysis on query

2007-10-04 Thread Keene, David
Hi,

Thanks for responding.  I should have been clearer..

By actual search I meant hitting the search demo page on the solr admin page. 
 So I get no results on this query:

/solr/select/?q=%E7%BE%8E%E8%81%AFversion=2.2start=0rows=10indent=on

But the same query (with the data in my index) on the analysis page shows me a 
hit (and the same search in Luke gets me a hit too).

I've tried this on 1.1, 1.2 and nightly as of yesterday. I assume that I am 
missing something really obvious..

-Dave


-Original Message-
From: Teruhiko Kurosaka [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 04, 2007 12:44 PM
To: Keene, David
Cc: solr-user@lucene.apache.org
Subject: RE: question about bi-gram analysis on query

Hello David,
 And if I do a search in Luke and the solr analysis page 
 for美聯, I get a hit.  But on the actual search, I don't.

I think you need to tell us what you mean by actual search
and your code that interfaces with Solr.

-kuro


question about bi-gram analysis on query

2007-10-02 Thread Keene, David
Hey guys,

I'm trying to index a field in Chinese using the CJKTokenizer, and I'm finding 
that my searches on the index are not working at all.  The index is created 
properly (looking with Luke), and when I search against it with Luke the data 
comes back as I would expect.  Also, when I use the analysis page of solr 
admin, the result is what I would expect.  On an actual search though, nothing 
is found.

Here are the relevant snippets from my confs:

fieldtype name=text_zh class=solr.TextField
  analyzer
tokenizer
  class=org.apache.solr.analysis.ja.CJKTokenizerFactory/
  filter class=solr.LowerCaseFilterFactory/
  filter class=solr.TrimFilterFactory /
  /analyzer
/fieldtype

...

field name=text type=text_zh indexed=true stored=false 
multiValued=true/


So if I send in
美聯社 
it correctly creates 2 tokens
美聯  聯社  

And if I do a search in Luke and the solr analysis page for美聯, I get a hit.  
But on the actual search, I don't.

Also, I've noticed that the parsed query on luke is:
text:美聯 聯社
and in solr it is:
text:美聯 聯社 
I noticed there is an extra space in the solr parsed query.  I don't know if 
that makes a difference.

I'm really at a loss.  Does anyone know why I don’t get search hits back?

Thanks,
Dave Keene