RE: Exception in SOLR when querying for fields of type string

2007-11-14 Thread Kasi Sankaralingam
No I do not have a default field defined, how would you do that? Thanks a lot, 
kasi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yonik Seeley
Sent: Tuesday, November 13, 2007 5:41 PM
To: solr-user@lucene.apache.org
Subject: Re: Exception in SOLR when querying for fields of type string

On Nov 13, 2007 6:23 PM, Kasi Sankaralingam [EMAIL PROTECTED] wrote:
 It is not tokenized, it is a string field, so will it still match
 photo for field 'title_s' and book for the default field?

Yes, because the query parser splits up things by whitespace before
analyzers are even applied.
Do you have a default field defined?

-Yonik


RE: Exception in SOLR when querying for fields of type string

2007-11-13 Thread Stu Hood
The first question is, what version of Solr are you using?

Thanks,
Stu


-Original Message-
From: Kasi Sankaralingam [EMAIL PROTECTED]
Sent: Tuesday, November 13, 2007 2:27pm
To: solr-user@lucene.apache.org solr-user@lucene.apache.org
Subject: Exception in SOLR when querying for fields of type string

Hi,

I am running into nullpointerexception on the SOLR side, when I do the 
following:

a)  Define a dynamic field in the schema of type string (say title_s)

b)  Do a query in the SOLR admin tool title_s: photo book

I get a null pointer exception when I run a search query on this.

If I enclose the search term within double quotes like photo book, it works 
fine.

Any ideas?

Thanks,

kasi




RE: Exception in SOLR when querying for fields of type string

2007-11-13 Thread Kasi Sankaralingam
I am using the latest version of solr (1.2)

-Original Message-
From: Stu Hood [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 13, 2007 11:32 AM
To: solr-user@lucene.apache.org
Subject: RE: Exception in SOLR when querying for fields of type string

The first question is, what version of Solr are you using?

Thanks,
Stu


-Original Message-
From: Kasi Sankaralingam [EMAIL PROTECTED]
Sent: Tuesday, November 13, 2007 2:27pm
To: solr-user@lucene.apache.org solr-user@lucene.apache.org
Subject: Exception in SOLR when querying for fields of type string

Hi,

I am running into nullpointerexception on the SOLR side, when I do the 
following:

a)  Define a dynamic field in the schema of type string (say title_s)

b)  Do a query in the SOLR admin tool title_s: photo book

I get a null pointer exception when I run a search query on this.

If I enclose the search term within double quotes like photo book, it works 
fine.

Any ideas?

Thanks,

kasi




Re: Exception in SOLR when querying for fields of type string

2007-11-13 Thread Ryan McKinley


Can you post the full exception?



b) Do a query in the SOLR admin tool title_s: photo book



Do you have a space after the ':'?

 q=title_s: photo book

I expect that would fail (though null pointer is not a very nice error)

 q=title_s:photo book

should work fine:

 title_s:photo book

would match photo for field 'title_s' and book for the default field.


ryan


RE: Exception in SOLR when querying for fields of type string

2007-11-13 Thread Kasi Sankaralingam
It is not tokenized, it is a string field, so will it still match
photo for field 'title_s' and book for the default field?


Here is the exception stack trace:
HTTP Status 500 - null java.lang.NullPointerException at 
org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:73) 
at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1092) at 
org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:979) at 
org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:907) at 
org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:896) 
at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:146) at 
org.apache.solr.search.QueryParsing.parseQuery(QueryParsing.java:94) at 
org.apache.solr.request.StandardRequestHandler.handleRequestBody(StandardRequestHandler.java:109)
 at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77)
 at org.apache.solr.core.SolrCore.execute(SolrCore.java:658) at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:191) 
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:159)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) 
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)


-Original Message-
From: Ryan McKinley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 13, 2007 2:26 PM
To: solr-user@lucene.apache.org
Subject: Re: Exception in SOLR when querying for fields of type string


Can you post the full exception?


 b) Do a query in the SOLR admin tool title_s: photo book


Do you have a space after the ':'?

  q=title_s: photo book

I expect that would fail (though null pointer is not a very nice error)

  q=title_s:photo book

should work fine:

  title_s:photo book

would match photo for field 'title_s' and book for the default field.


ryan


Re: Exception in SOLR when querying for fields of type string

2007-11-13 Thread Yonik Seeley
On Nov 13, 2007 6:23 PM, Kasi Sankaralingam [EMAIL PROTECTED] wrote:
 It is not tokenized, it is a string field, so will it still match
 photo for field 'title_s' and book for the default field?

Yes, because the query parser splits up things by whitespace before
analyzers are even applied.
Do you have a default field defined?

-Yonik