You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Vinci <vi...@polyu.edu.hk> on 2008/03/26 18:17:14 UTC

Search fail if copyField absent?(+ Jetty Question)

Hi,

While I am testing the Solr schema (1.3 nightly) with example mySolr on
jetty, for the exampledocs and the default schema,
I see the declaration: 
<field name="features" type="text" indexed="true" stored="true"
multiValued="true"/>
it should be indexed, so  I comment this
<copyField source="features" dest="text"/>

However, the search fail. After I clear up the index and, uncomment the
copyField and commit the document again, the search work again.

That I feeling very confusing as wiki and the schema.xml said this is
optional...is this a bug or wiki information is wrong?

------------------
For mySolr on Jetty, some question
1. I only need to reload the server when I changed the JSP and html, schema
and config file but no need for index update?
2. Can I gain faster reloading if I extract the war file content into
webapps and then start the application from directory but not the war file?
3. Everytime I load the start.jar I will get this exception:
2008/3/27 AM 12:55:55 org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
        at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:136)
        at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:118)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:953)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:968)
        at
org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:50)
        at org.apache.solr.core.SolrCore$3.call(SolrCore.java:797)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)
although the Solr run fine, I still worry for the hidden exception - does
this exception harmful? 

Thank you
Vinci
-- 
View this message in context: http://www.nabble.com/Search-fail-if-copyField-absent-%28%2B-Jetty-Question%29-tp16306854p16306854.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Search fail if copyField absent?(+ Jetty Question)

Posted by Chris Hostetter <ho...@fucit.org>.
: I doesn't change other thing about field in default schema, so I think you
: are correct...Then here is one question: Can I use parameter to change the
: search field when query come in?

You can change the query string, or you can change the "df" dfualt search 
field, or if you are using hte dismax syntax you can change the "qf" 
query fields.

http://wiki.apache.org/solr/StandardRequestHandler#head-54c4743325ef5891a2c734963bfa367d89d7adc5
http://wiki.apache.org/solr/DisMaxRequestHandler#head-af452050ee272a1c88e2ff89dc0012049e69e180

Or you could change "The Default Search Field" right in the schema if you 
don't plan on using hte "text" field at all...

http://wiki.apache.org/solr/SchemaXml#head-b80c539a0a01eef8034c3776e49e8fe1c064f496


-Hoss


Re: Search fail if copyField absent?(+ Jetty Question)

Posted by Vinci <vi...@polyu.edu.hk>.
Hi hossman,

Thank you for your reply, it help a lots...just little more question here:


hossman wrote:
> 
> 
> : it should be indexed, so  I comment this
> : <copyField source="features" dest="text"/>
> : 
> : However, the search fail. After I clear up the index and, uncomment the
> : copyField and commit the document again, the search work again.
> : 
> : That I feeling very confusing as wiki and the schema.xml said this is
> : optional...is this a bug or wiki information is wrong?
> 
> are you searching on the "text" field ... in teh example schema it is the 
> default search field, so unless you are explicitly putting data in that 
> field for your docs, that copyField may be hte only way info is getting 
> into thatfield ... without it it's not suprising that searches on the text 
> field wouldn't work.
> 
I doesn't change other thing about field in default schema, so I think you
are correct...Then here is one question: Can I use parameter to change the
search field when query come in?



hossman wrote:
> 
> : 2. Can I gain faster reloading if I extract the war file content into
> : webapps and then start the application from directory but not the war
> file?
> 
> I doubt it .. but that would relaly depend on how the application server 
> works.
> 
I see jetty have do some caching...so many be the effect appear when I
recomplie a war file.
But at least I can change the jsp and as well as the style sheet easier :)


hossman wrote:
> 
> : 3. Everytime I load the start.jar I will get this exception:
> : 2008/3/27 AM 12:55:55 org.apache.solr.common.SolrException log
> : SEVERE: java.lang.NullPointerException
> 	...
> :
> org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:50)
> 
> ...that looks like this known bug...
> 
> http://issues.apache.org/jira/browse/SOLR-509
> 
Seems they didn't fix it yet...but it seems harmless.

Thank you,
Vinci

-- 
View this message in context: http://www.nabble.com/Search-fail-if-copyField-absent-%28%2B-Jetty-Question%29-tp16306854p16320160.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Search fail if copyField absent?(+ Jetty Question)

Posted by Chris Hostetter <ho...@fucit.org>.
: it should be indexed, so  I comment this
: <copyField source="features" dest="text"/>
: 
: However, the search fail. After I clear up the index and, uncomment the
: copyField and commit the document again, the search work again.
: 
: That I feeling very confusing as wiki and the schema.xml said this is
: optional...is this a bug or wiki information is wrong?

are you searching on the "text" field ... in teh example schema it is the 
default search field, so unless you are explicitly putting data in that 
field for your docs, that copyField may be hte only way info is getting 
into thatfield ... without it it's not suprising that searches on the text 
field wouldn't work.

: 1. I only need to reload the server when I changed the JSP and html, schema
: and config file but no need for index update?

corret ... just send a <commit/> command.

: 2. Can I gain faster reloading if I extract the war file content into
: webapps and then start the application from directory but not the war file?

I doubt it .. but that would relaly depend on how the application server 
works.

: 3. Everytime I load the start.jar I will get this exception:
: 2008/3/27 AM 12:55:55 org.apache.solr.common.SolrException log
: SEVERE: java.lang.NullPointerException
	...
: org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:50)

...that looks like this known bug...

http://issues.apache.org/jira/browse/SOLR-509


-Hoss