Installing Solr into Apache Geronimo

2008-03-06 Thread Thomas G Lawless

I'm new to both Solr and Geronimo.  When I attempt to install the Solr war
into Geronimo, I get the following exception.  Has anyone else seen this
problem and overcome it?

Deployment failed:
Error parsing web.xml for .
Show full details
Error parsing web.xml for .
org.apache.geronimo.common.DeploymentException: Error parsing web.xml for .
 at
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModule(TomcatModuleBuilder.java:161)

 at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createModule(AbstractWebModuleBuilder.java:179)

 at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder$$FastClassByCGLIB$$8523248f.invoke()

 at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
 at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

 at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)

 at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)

 at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
 at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)

 at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)

 at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$b86e2c25.createModule()

 at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.createModule(SwitchingModuleBuilder.java:94)

 at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke()

 at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
 at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

 at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)

 at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)

 at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
 at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)

 at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)

 at
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$b86e2c25.createModule()

 at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPlan(EARConfigBuilder.java:289)

 at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke()

 at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
 at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

 at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)

 at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)

 at
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
 at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)

 at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)

 at
org.apache.geronimo.j2ee.deployment.CorbaGBeanNameSource$$EnhancerByCGLIB$$ef9ba63a.getDeploymentPlan()

 at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:234)
 at
org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)
 at
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke()

 at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
 at
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)

 at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)

 at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)

 at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
 at
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)

 at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)

 at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.xmlbeans.XmlException: error: Unexpected element:
CDATA
 at
org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3471)
 at
org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:706)
 at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:690)
 at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:677)
 at
org.apache.xml

RE: passing params into SOLR

2008-03-06 Thread Paul Treszczotko
What I'm trying to do is to pass a query string as such:
?q=searchTerm&facet.field=navigator&facet=true&fq=navigator:"some text" right 
into SOLR without splitting each parameter from the query string and setting it 
with setParam() or setQuery().
And the questions I have:
- is there a method to pass the QS from the above into SOLR and have it set all 
the params automatically
- if there is, is this the best way going about it?

Thanks!

pt





Paul Treszczotko
Architect, Client Systems
INPUT
11720 Plaza America Drive, Suite 1200 Reston, Virginia 20190
Direct: 703-707-3524; Fax 703-707-6201
This email and any files transmitted with it are confidential and are intended 
solely for the use of the individual or entity to which they are addressed. If 
you are not the intended recipient or the person responsible for delivering the 
email to the intended recipient, be advised that you have received this email 
and any such files in error and that any use, dissemination, forwarding, 
printing or copying of this email and/or any such files is strictly prohibited. 
If you have received this email in error please immediately notify [EMAIL 
PROTECTED] and destroy the original message and any such files.
-Original Message-

From: Ryan McKinley [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2008 8:12 PM
To: solr-user@lucene.apache.org
Subject: Re: passing params into SOLR

Paul Treszczotko wrote:
> Hi all,
>
> I'm using solrJ to build a wrapper for ColdFusion (scripting language such as 
> PHP). What's the best practice for passing search parameters into solr from a 
> web app? What are the shortcomings of each approach?  Currently, I'm 
> explicitly setting the params with solrQuery.setParam("name","value") and 
> solrQuery.addFacetField("facet","value") etc.
>
> How would I go about passing a valid query string into solr? Do I need to 
> 'decompose' it into parameters and then set them with setParam()s, or is 
> there a method that will take the entire URL and execute it as is?
>

I'm not sure I follow what the problem is.  The solrj API takes a
SolrParams argument.  SolrQuery is a subclass of SolrParms that has
helper functions to set the standard params.  For example:

   public void setQuery(String query) {
 this.set(CommonParams.Q, query);
   }

   public String getQuery() {
 return this.get(CommonParams.Q);
   }

So it is exactly equivalent to use:
   solrQuery.setQuery( "hello" );
or
   solrQuery.set( "q", "hello" )

though stylistically the former may be nicer and easier to maintain.

---

Also, when you post a message to the group, start a new message rather
then replying to another on -- it makes things hard to follow.
http://people.apache.org/~hossman/#threadhijack


ryan



> pt
> ???0?
>
> Paul Treszczotko
> Architect, Client Systems
> INPUT
> 11720 Plaza America Drive, Suite 1200 Reston, Virginia 20190
> Direct: 703-707-3524; Fax 703-707-6201
> This email and any files transmitted with it are confidential and are 
> intended solely for the use of the individual or entity to which they are 
> addressed. If you are not the intended recipient or the person responsible 
> for delivering the email to the intended recipient, be advised that you have 
> received this email and any such files in error and that any use, 
> dissemination, forwarding, printing or copying of this email and/or any such 
> files is strictly prohibited. If you have received this email in error please 
> immediately notify [EMAIL PROTECTED] and destroy the original message and any 
> such files.
>
>
>



Highlighting Default Fields

2008-03-06 Thread Grant Ingersoll

Hi,

The Solr Highlighting docs says the following when it comes to picking  
the default fields:
A comma- or space- delimited list of fields to generate highlighted  
snippets for. If left blank, the fields highlighted for the  
StandardRequestHandler are the defaultSearchField (or the df param if  
used) and for the DisMaxRequestHandler the qf fields are used.



However, I am doing a DisMax query and when I debug it shows that it  
is falling back on the default field in the schema, not the qf  
fields.  Looking at the code in SolrHighlighter confirms this.  Is it  
a bug or should I change the wiki (or both)?


-Grant




Composite key for uniqueKeyId

2008-03-06 Thread Jon Baer

Hi,

Im interested to know if composite keys are now possible or if there  
is anything to copyField I can use to get composite keys working for  
my doc ids?


Thanks.

-snip-
support for composite keys ... either with some explicit change to the  
``
declaration or perhaps just copyField with some hidden magic that  
concats the resulting terms

into a single key Term
-snip-

- Jon


Classpath management in the example

2008-03-06 Thread Benson Margulies
I am trying to add a directory and some jars to the classpath in the
example, so I can test out some code while being able to modify it in
eclipse.

My results have me puzzled.

I see that the example uses the jetty start.jar.

I see only one start.config file in sight, the one inside start.jar.

So, I made a copy of that, and added my stuff to the end. And now I get ...

SEVERE: java.lang.NoClassDefFoundError:
org/apache/solr/analysis/TokenizerFactory


passing query string into SOLR

2008-03-06 Thread Paul Treszczotko
What I'm trying to do is to pass a query string as such:
?q=searchTerm&facet.field=navigator&facet=true&fq=navigator:"some text" right 
into SOLR without splitting each parameter from the query string and setting it 
with setParam() or setQuery().
And the questions I have:
- is there a method to pass the QS from the above into SOLR and have it set all 
the params automatically
- if there is, is this the best way going about it?

Thanks!

pt


Paul Treszczotko
Architect, Client Systems
INPUT
11720 Plaza America Drive, Suite 1200 Reston, Virginia 20190
Direct: 703-707-3524; Fax 703-707-6201
This email and any files transmitted with it are confidential and are intended 
solely for the use of the individual or entity to which they are addressed. If 
you are not the intended recipient or the person responsible for delivering the 
email to the intended recipient, be advised that you have received this email 
and any such files in error and that any use, dissemination, forwarding, 
printing or copying of this email and/or any such files is strictly prohibited. 
If you have received this email in error please immediately notify [EMAIL 
PROTECTED] and destroy the original message and any such files.




mixing solr date and magic date words

2008-03-06 Thread pakore

I would like to send this query to Solr:

date:[2008-02-02T16:45:58Z-90DAY TO 2008-02-02T16:45:58Z-3DAY]

the date is obtained from a document and i want to obtain the documents
withing the range 3-90 days old from the given document. So what i do is
obtain the document date and then try to execute that query, but does not
accept the query.

Is there any way Solr can handle this kind of query?

Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/mixing-solr-date-and-magic-date-words-tp15883004p15883004.html
Sent from the Solr - User mailing list archive at Nabble.com.



Out of memory in analysis

2008-03-06 Thread Benson Margulies
I pasted a modest blob of text into the analysis debug slot on the admin
app, and am rewarded with this, even with -Xmx1g.

java.lang.OutOfMemoryError: Java heap space
at java.util.ArrayList.ensureCapacity(ArrayList.java:169)
at java.util.ArrayList.add(ArrayList.java:351)
at org.apache.jsp.admin.analysis_jsp.getTokens(
org.apache.jsp.admin.analysis_jsp:87)
at org.apache.jsp.admin.analysis_jsp.doAnalyzer(
org.apache.jsp.admin.analysis_jsp:46)
at org.apache.jsp.admin.analysis_jsp._jspService(
org.apache.jsp.admin.analysis_jsp:559)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java
:80)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
JspServlet.java:464)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:358)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java
:487)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1098)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
SolrDispatchFilter.java:185)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
ServletHandler.java:1089)
at org.mortbay.jetty.servlet.ServletHandler.handle(
ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(
SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(
SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(
ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java
:405)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(
ContextHandlerCollection.java:211)
at org.mortbay.jetty.handler.HandlerCollection.handle(
HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(
HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(
HttpConnection.java:502)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
HttpConnection.java:821)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(
SocketConnector.java:226)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(
BoundedThreadPool.java:442)


run-ketty-run

2008-03-06 Thread Benson Margulies
A helpful correspondent responded to a JIRA of mine suggesting run-jetty-run
to debug solr plugins from eclipse.

Can someone provide a bit more detail? Do you link your examples dir into
your Eclipse project? Make a separate Eclipse project that points to the
examples dir?


Re: run-ketty-run

2008-03-06 Thread Ryan McKinley

Benson Margulies wrote:

A helpful correspondent responded to a JIRA of mine suggesting run-jetty-run
to debug solr plugins from eclipse.

Can someone provide a bit more detail? Do you link your examples dir into
your Eclipse project? Make a separate Eclipse project that points to the
examples dir?



For testing plugins in eclipse, I create a project and add all the solr 
jars + dependancies.  Then i bang away at my own plugins.


For testing, I use:
http://code.google.com/p/run-jetty-run/
and point the web app to a dummy app context that just has the web.xml 
from solr.war  (granted this is a bit ugly, and you don't get any of the 
admin jsp stuff)


But this is nice because you don't have to futz with debugging ports and 
all that nonsense.


Other people may have other methods though...








Re: run-ketty-run

2008-03-06 Thread Benson Margulies
Got it, thanks.

On Thu, Mar 6, 2008 at 3:45 PM, Ryan McKinley <[EMAIL PROTECTED]> wrote:

> Benson Margulies wrote:
> > A helpful correspondent responded to a JIRA of mine suggesting
> run-jetty-run
> > to debug solr plugins from eclipse.
> >
> > Can someone provide a bit more detail? Do you link your examples dir
> into
> > your Eclipse project? Make a separate Eclipse project that points to the
> > examples dir?
> >
>
> For testing plugins in eclipse, I create a project and add all the solr
> jars + dependancies.  Then i bang away at my own plugins.
>
> For testing, I use:
> http://code.google.com/p/run-jetty-run/
> and point the web app to a dummy app context that just has the web.xml
> from solr.war  (granted this is a bit ugly, and you don't get any of the
> admin jsp stuff)
>
> But this is nice because you don't have to futz with debugging ports and
> all that nonsense.
>
> Other people may have other methods though...
>
>
>
>
>
>
>


Re: Delete document

2008-03-06 Thread Otis Gospodnetic
Hi,

Combine those id:XXX id:YYY's with an OR: id:XXX OR id:YYY . and post that 
for deletion.  That should do it.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

- Original Message 
From: Feng Gao <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, March 4, 2008 5:14:58 PM
Subject: RE: Delete document

Try this: 05991

As I remember, we only can delete one doc once, but I am not sure. Give that
a try later.

Feng

-Original Message-
From: Jae Joo [mailto:[EMAIL PROTECTED] 
Sent: March 4, 2008 5:06 PM
To: solr-user
Subject: Delete document

Hi,

I have many document to be deleted and the xml file is built shown as below.

delete.xml

id:0286-14582373
id:0286-14582372
id:0286-14582371
id:0286-14582415
id:0286-14582414
id:0286-14582413
id:0286-14582412
id:0286-14582411
id:0286-14582410
id:0286-14582409
id:0286-14582408



Once I post it using post.sh command (post.sh delete.xml), the only first
document is deleted.

Did I miss something?

Thanks,

Jae






RE: Use of get instead of post may be causing some problems

2008-03-06 Thread Lance Norskog
I just switched to doing posts for queries. We have a bunch of filters etc.
and Solr stopped working on tomcat. 

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 06, 2008 12:43 PM
To: solr-user
Subject: Use of get instead of post may be causing some problems

INFO: SolrUpdateServlet.init() done
2008-03-06 15:39:38.152::INFO:  Started SocketConnector @ 0.0.0.0:8983
_header=[2418689,16491778,m=3018,g=4096,p=4096,c=4096]={
http://localhost:8983/solr/admin/analysis.jsp?name=text&val=%D8%A7%D9%84%D8%
AC%D9%8E%D8%B2%D9%8A%D8%B1%D8%A9+%D8%A7%D9%88%D9%86%D9%84%D8%A7%D9%8A%D9%86%
3A+%D9%87%D9%88+%D9%85%D8%AD%D9%85%D8%AF+%D8%B3%D8%B9%D9%8A%D8%AF+%D8%B9%D8%
A8%D8%AF+%D8%A7%D9%84%D9%84%D9%87%D8%8C+%D8%A7%D9%84%D9%85%D8%B9%D8%B1%D9%88
%D9%81+%D8%A8%D8%A7%D8%A8%D9%86+%D8%B3%D9%8E%D8%B9%D8%AF%D9%88%D9%86.+%D9%85
%D9%88%D9%84%D9%88%D8%AF+%D9%81%D9%8A+%D8%B7%D9%86%D8%AC%D8%A9%D8%8C+%D8%A7%
D9%84%D8%A5%D8%AB%D9%86%D9%8A%D9%86+%D9%A1%D9%A7+%D8%B1%D8%AC%D8%A8+%D8%B3%D
9%86%D8%A9+%D9%A7%D9%A0%D9%A3%D9%87%D9%80.+%D9%82+%D8%A7%D8%A8%D9%86+%D8%B3%
D8%B9%D8%AF%D9%88%D9%86+%D8%A8%D8%AB%D9%84%D8%A7%D8%AB+%D8%B1%D8%AD%D9%84%D8
%A7%D8%AA%3A+%D8%A7%D9%84%D8%A3%D9%88%D9%84%D9%89%D8%8C+%D8%A8%D8%AF%D8%A3%D
9%87%D8%A7+%D9%81%D9%8A+%D8%A7%D9%84%D8%AB%D8%A7%D9%86%D9%8A+%D9%85%D9%86+%D
8%B1%D8%AC%D8%A8+%D8%B3%D9%86%D8%A9+725%D9%87%D9%80+%D9%88%D8%A7%D9%86%D8%AA
%D9%87%D9%89+%D9%81%D9%8A+%D8%A3%D9%88%D8%A7%D8%AE%D8%B1+%D8%B4%D8%B9%D8%A8%
D8%A7%D9%86+%D8%B3%D9%86%D8%A9+%D9%A7%D9%A5%D9%A0+%D9%87%D9%80.+%D9%88+%D9%8
3%D8%A7%D9%86+}{
}
_buffer=[2418689,16491778,m=3018,g=4096,p=4096,c=4096]={
http://localhost:8983/solr/admin/analysis.jsp?name=text&val=%D8%A7%D9%84%D8%
AC%D9%8E%D8%B2%D9%8A%D8%B1%D8%A9+%D8%A7%D9%88%D9%86%D9%84%D8%A7%D9%8A%D9%86%
3A+%D9%87%D9%88+%D9%85%D8%AD%D9%85%D8%AF+%D8%B3%D8%B9%D9%8A%D8%AF+%D8%B9%D8%
A8%D8%AF+%D8%A7%D9%84%D9%84%D9%87%D8%8C+%D8%A7%D9%84%D9%85%D8%B9%D8%B1%D9%88
%D9%81+%D8%A8%D8%A7%D8%A8%D9%86+%D8%B3%D9%8E%D8%B9%D8%AF%D9%88%D9%86.+%D9%85
%D9%88%D9%84%D9%88%D8%AF+%D9%81%D9%8A+%D8%B7%D9%86%D8%AC%D8%A9%D8%8C+%D8%A7%
D9%84%D8%A5%D8%AB%D9%86%D9%8A%D9%86+%D9%A1%D9%A7+%D8%B1%D8%AC%D8%A8+%D8%B3%D
9%86%D8%A9+%D9%A7%D9%A0%D9%A3%D9%87%D9%80.+%D9%82+%D8%A7%D8%A8%D9%86+%D8%B3%
D8%B9%D8%AF%D9%88%D9%86+%D8%A8%D8%AB%D9%84%D8%A7%D8%AB+%D8%B1%D8%AD%D9%84%D8
%A7%D8%AA%3A+%D8%A7%D9%84%D8%A3%D9%88%D9%84%D9%89%D8%8C+%D8%A8%D8%AF%D8%A3%D
9%87%D8%A7+%D9%81%D9%8A+%D8%A7%D9%84%D8%AB%D8%A7%D9%86%D9%8A+%D9%85%D9%86+%D
8%B1%D8%AC%D8%A8+%D8%B3%D9%86%D8%A9+725%D9%87%D9%80+%D9%88%D8%A7%D9%86%D8%AA
%D9%87%D9%89+%D9%81%D9%8A+%D8%A3%D9%88%D8%A7%D8%AE%D8%B1+%D8%B4%D8%B9%D8%A8%
D8%A7%D9%86+%D8%B3%D9%86%D8%A9+%D9%A7%D9%A5%D9%A0+%D9%87%D9%80.+%D9%88+%D9%8
3%D8%A7%D9%86+}{
}
2008-03-06 15:41:24.839::WARN:  handle failed
java.io.IOException: FULL
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:274)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(
SocketConnector.java:226)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(
BoundedThreadPool.java:442)



Re: Some problem with ShowFileRequestHandler

2008-03-06 Thread Edward Zhang
My workmate and me found a solution to this problem: it caused by
org.apache.solr.request.RawResponseWriter.
Solr required the config file encoded in UTF-8 by far. But when
RawResponseWriter put the byte stream to writer, it doesn't notice the
characters encoding.There may be some trouble when the xml file contain
CJK characters.

 So we add argument "utf-8" for method "IOUtils.copy" and we send the
request with "admin/file/?file=schema.xml&contentType=text/xml;charset=utf-8",
it works!

Am I right?

May be method "IOUtils.copy( content.getStream(), writer)" keep default
encoding argument for more encoded config files support?


>   public void write(Writer writer, SolrQueryRequest request,
> SolrQueryResponse response) throws IOException
>   {
> Object obj = response.getValues().get( CONTENT );
> if( obj != null && (obj instanceof ContentStream ) ) {
>   // copy the contents to the writer...
>   ContentStream content = (ContentStream)obj;
>   //IOUtils.copy( content.getStream(), writer);
>   IOUtils.copy( content.getStream(), writer, "utf-8");
> }
> else {
>   getBaseWriter( request ).write( writer, request, response );
> }
>   }
>
On 3/6/08, Edward Zhang <[EMAIL PROTECTED]> wrote:
>
> I want to programmatically retrieve the schema and the config from the
> ShowFileRequestHandler.  I encounter some trouble. There are CJK characters
> in the xml files as follows:
>
>
> >  
> >  记录号
> >
>
> But I get a confusing response from solr using "/admin/file/?file=
> schema.xml". IE and firefox both report parse errors.I try
> "/admin/file/?file=schema.x&contentType=text/plain" and I get the same
> result as follow:
>
>
> >  
> >  ?/uniqueKey>
>
>
> BTW: The xml files are encoded in UTF-8 and they work fine when I open
> these files locally using IE. And I set tomcat's 8080 connector
> "URIEncoding" argument "UTF-8" too.
> So is there anything missing for me? Or is it a bug?
>
> Every reply would be appreciated.
>
>
>
>
>


Re: Composite key for uniqueKeyId

2008-03-06 Thread Norberto Meijome
On Thu, 6 Mar 2008 11:33:38 -0500
Jon Baer <[EMAIL PROTECTED]> wrote:

> Im interested to know if composite keys are now possible or if there  
> is anything to copyField I can use to get composite keys working for  
> my doc ids?

FWIW, we just do this @ doc generation time - grab several fields, massage them 
into shape, normalise, assign to docID
B
_
{Beto|Norberto|Numard} Meijome

...using the internet as it was originally intended... for the further research 
of pornography and pipebombs.

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.


Re: Some problem with ShowFileRequestHandler

2008-03-06 Thread Ryan McKinley
Thanks for pointing this out.

In trunk, I changed the RawResponseWriter to use the Reader rather then
the Stream -- this way, you should not have to specify the contentType
to make it match the FileReader.

Does this fix your issues?

thanks
ryan


Edward Zhang wrote:
> My workmate and me found a solution to this problem: it caused by
> org.apache.solr.request.RawResponseWriter.
> Solr required the config file encoded in UTF-8 by far. But when
> RawResponseWriter put the byte stream to writer, it doesn't notice the
> characters encoding.There may be some trouble when the xml file contain
> CJK characters.
> 
>  So we add argument "utf-8" for method "IOUtils.copy" and we send the
> request with "admin/file/?file=schema.xml&contentType=text/xml;charset=utf-8",
> it works!
> 
> Am I right?
> 
> May be method "IOUtils.copy( content.getStream(), writer)" keep default
> encoding argument for more encoded config files support?
> 
> 
>>   public void write(Writer writer, SolrQueryRequest request,
>> SolrQueryResponse response) throws IOException
>>   {
>> Object obj = response.getValues().get( CONTENT );
>> if( obj != null && (obj instanceof ContentStream ) ) {
>>   // copy the contents to the writer...
>>   ContentStream content = (ContentStream)obj;
>>   //IOUtils.copy( content.getStream(), writer);
>>   IOUtils.copy( content.getStream(), writer, "utf-8");
>> }
>> else {
>>   getBaseWriter( request ).write( writer, request, response );
>> }
>>   }
>>
> On 3/6/08, Edward Zhang <[EMAIL PROTECTED]> wrote:
>> I want to programmatically retrieve the schema and the config from the
>> ShowFileRequestHandler.  I encounter some trouble. There are CJK characters
>> in the xml files as follows:
>>
>>
>>>  
>>>  记录号
>>>
>> But I get a confusing response from solr using "/admin/file/?file=
>> schema.xml". IE and firefox both report parse errors.I try
>> "/admin/file/?file=schema.x&contentType=text/plain" and I get the same
>> result as follow:
>>
>>
>>>  
>>>  ?/uniqueKey>
>>
>> BTW: The xml files are encoded in UTF-8 and they work fine when I open
>> these files locally using IE. And I set tomcat's 8080 connector
>> "URIEncoding" argument "UTF-8" too.
>> So is there anything missing for me? Or is it a bug?
>>
>> Every reply would be appreciated.
>>
>>
>>
>>
>>



Re: passing query string into SOLR

2008-03-06 Thread Ryan McKinley

Paul Treszczotko wrote:

What I'm trying to do is to pass a query string as such:
?q=searchTerm&facet.field=navigator&facet=true&fq=navigator:"some text" right 
into SOLR without splitting each parameter from the query string and setting it with setParam() or 
setQuery().
And the questions I have:
- is there a method to pass the QS from the above into SOLR and have it set all 
the params automatically
- if there is, is this the best way going about it?



Nope, the solrj API requires a SolrParams object to represent the 
parameters.  There is no way (simple/clean) way to bypass that and 
directly use a query string.


ryan


Re: Question about facet.prefix usage

2008-03-06 Thread Ryan McKinley

steve berry wrote:


Question: Is it possible to pass complex queries to facet.prefix? 
Example instead of facet.prefix:foo I want facet.prefix:foo OR 
facet.prefix:bar




No (unless you want to write your own SimpleFacets subclass)




The multivalued market_category fields are flattened relational data 
attributed to that business and I want to use those values for facted 
navigation /but/ I want the facets to be restricted depending on what 
products the user has access to. For example a user may have access to 
sanfrancisco_2007 and sanfrancisco_2006 data but nothing else.




perhaps you could have two fields: city and year

then to limit access to 2006 or 2007, you would add a filter query: 
fq=year:2006 OR year:2007



ryan


What is default Date time format in Solr

2008-03-06 Thread Mahesh Udupa
Hi all,

I heard Solr Date time format is 24 hours.
But I have following query regarding Search time.


In database I have a content with time as :- 2007-12-31 22:29:59

In oder to get this content I tried with following Range query:-

emf.artist:[2007-12-31T22:20:00Z TO  2007-12-31T22:39:00Z]

I am not able to get the content what I expected.

But, I tried with following query:-

emf.artist:[2007-12-31T10:20:00Z TO  2007-12-31T10:39:00Z]

It is perfectly working fine.

My Schema.xml content for Date field is like this :-



Solrconfig.xml


 
 incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2


Could you please let me know how can I search a content with 24 Hour format?

Looking forward hearing from u soon

Thanks in advance

-kmu


Re: Some problem with ShowFileRequestHandler

2008-03-06 Thread Edward Zhang
It wroks, and a request with
argument "&contentType=text/xml;charset=utf-8"  required to show my CJK
characters in my config file.

Thanks, Ryan

On 3/7/08, Ryan McKinley <[EMAIL PROTECTED]> wrote:
>
> Thanks for pointing this out.
>
> In trunk, I changed the RawResponseWriter to use the Reader rather then
> the Stream -- this way, you should not have to specify the contentType
> to make it match the FileReader.
>
> Does this fix your issues?
>
> thanks
> ryan
>
>
> Edward Zhang wrote:
> > My workmate and me found a solution to this problem: it caused by
> > org.apache.solr.request.RawResponseWriter.
> > Solr required the config file encoded in UTF-8 by far. But when
> > RawResponseWriter put the byte stream to writer, it doesn't notice the
> > characters encoding.There may be some trouble when the xml file contain
> > CJK characters.
> >
> >  So we add argument "utf-8" for method "IOUtils.copy" and we send the
> > request with "admin/file/?file=schema.xml&contentType=text/xml
> ;charset=utf-8",
> > it works!
> >
> > Am I right?
> >
> > May be method "IOUtils.copy( content.getStream(), writer)" keep default
> > encoding argument for more encoded config files support?
> >
> >
> >>   public void write(Writer writer, SolrQueryRequest request,
> >> SolrQueryResponse response) throws IOException
> >>   {
> >> Object obj = response.getValues().get( CONTENT );
> >> if( obj != null && (obj instanceof ContentStream ) ) {
> >>   // copy the contents to the writer...
> >>   ContentStream content = (ContentStream)obj;
> >>   //IOUtils.copy( content.getStream(), writer);
> >>   IOUtils.copy( content.getStream(), writer, "utf-8");
> >> }
> >> else {
> >>   getBaseWriter( request ).write( writer, request, response );
> >> }
> >>   }
> >>
> > On 3/6/08, Edward Zhang <[EMAIL PROTECTED]> wrote:
> >> I want to programmatically retrieve the schema and the config from the
> >> ShowFileRequestHandler.  I encounter some trouble. There are CJK
> characters
> >> in the xml files as follows:
> >>
> >>
> >>>  
> >>>  记录号
> >>>
> >> But I get a confusing response from solr using "/admin/file/?file=
> >> schema.xml". IE and firefox both report parse errors.I try
> >> "/admin/file/?file=schema.x&contentType=text/plain" and I get the same
> >> result as follow:
> >>
> >>
> >>>  
> >>>  ?/uniqueKey>
> >>
> >> BTW: The xml files are encoded in UTF-8 and they work fine when I open
> >> these files locally using IE. And I set tomcat's 8080 connector
> >> "URIEncoding" argument "UTF-8" too.
> >> So is there anything missing for me? Or is it a bug?
> >>
> >> Every reply would be appreciated.
> >>
> >>
> >>
> >>
> >>
>
>


ranking on Multivalued fields

2008-03-06 Thread Umar Shah
Hi,

I have a problem where i want to rank multivalued fields

suppose a multivalued field "category" having associated subfield "score".
First Is it possible to have a subfield in the mutlivalued field?
Second I want to get the documents ranked with the highest score say for the
category:X

thanks
Umar Shah


Re: Some problem with ShowFileRequestHandler

2008-03-06 Thread Edward Zhang
Oh,I am sorry, Ryan, I am afriad I made a mistake.
It doesn't work yet.When I deploy the new war, it looks like before.
I rewrite to "IOUtils.copy( content.getStream(), writer, "utf-8" )" and it
works fine again!