Some recommendation for a beginner?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Some recommendation for a beginner?

Börteçin Ege
I want to build a search engine with Solr/Lucene. Shall I use for that
Apache Solr 3 or 4 (I think in this context Solr=Lucene)?
Furthermore, I have the Lucene in Action, 2nd Edition (for Lucene 3) from
2010. Is this book already obsolete?
Which books do you recommend for beginners? Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Some recommendation for a beginner?

Ted Dunning
Use Solr 4.  Much faster and it has many cool features.

The older version of LiA should be close to correct for many things.

On Mon, Mar 25, 2013 at 10:19 PM, Börteçin Ege <[hidden email]>wrote:

> I want to build a search engine with Solr/Lucene. Shall I use for that
> Apache Solr 3 or 4 (I think in this context Solr=Lucene)?
> Furthermore, I have the Lucene in Action, 2nd Edition (for Lucene 3) from
> 2010. Is this book already obsolete?
> Which books do you recommend for beginners? Thanks.
>
Reply | Threaded
Open this post in threaded view
|

Could not load config for solrconfig.xml

A. Lotfi
Hi,
I am trying solr with an oracle database, It's working but I have on the top of the page an exception :

SolrCore Initialization Failures
 
solr: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config for solrconfig.xml


Here is my solrconfig.xml :

<dataConfig>
    <dataSource driver="oracle.jdbc.OracleDriver"
            url="jdbc:oracle:thin:@ourIPaddress:1521:ourDB"
            user="username"
                password="password"/>
    <document>
        <entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA'"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
 <field column="LEMSMATCHCODE" name="lemsmatchcode" />
            <field column="STREETNAME" name="streetname" />
        </entity>
    </document>
</dataConfig>

Thanks, your help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Could not load config for solrconfig.xml

Chris Hostetter-3

1) the email list you want to be using is solr-user@lucene, not
general@lucene

2) there is a big differnece between "solrconfig.xml" (which controls in
general how solr works for managing a "SolrCore"); and the config files
for DIH (which can be used to tell Solr where/how to fetch data to index)
typically called data-config.xml (but you can name them anything you
want).

what you have described below is a data config file for DIH, if you are
trying to use it as a solrconfig.xml file you aren't going to get very
far.

I suggest you take a gandar at the example config set for using DIH with a
database...

https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/solrconfig.xml?view=markup
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/db-data-config.xml?view=log

...and keep them in mind while reviewing the DIH docs...

http://wiki.apache.org/solr/DataImportHandler



-Hoss
Reply | Threaded
Open this post in threaded view
|

Re: Could not load config for solrconfig.xml

A. Lotfi


 
Hi Hoss,

Thank you for replying to my question,

The solrconfig.xml in the example-DIH in solr download is exactly the same like the links you posted in your reply, so where is the big difference ?

I think I typed a mistake in my last question, instead of saying db-data-config.xml I said solrconfig.xml.

but still did not understand where that exception come from.
Your helps will be appreciated.

Abdel.

________________________________
 From: Chris Hostetter <[hidden email]>
To: "[hidden email]" <[hidden email]>; A. Lotfi <[hidden email]>
Sent: Wednesday, March 27, 2013 6:00 PM
Subject: Re: Could not load config for solrconfig.xml
 

1) the email list you want to be using is solr-user@lucene, not
general@lucene

2) there is a big differnece between "solrconfig.xml" (which controls in
general how solr works for managing a "SolrCore"); and the config files
for DIH (which can be used to tell Solr where/how to fetch data to index)
typically called data-config.xml (but you can name them anything you
want).

what you have described below is a data config file for DIH, if you are
trying to use it as a solrconfig.xml file you aren't going to get very
far.

I suggest you take a gandar at the example config set for using DIH with a
database...

https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/solrconfig.xml?view=markup
https://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/example-DIH/solr/db/conf/db-data-config.xml?view=log

...and keep them in mind while reviewing the DIH docs...

http://wiki.apache.org/solr/DataImportHandler



-Hoss
Reply | Threaded
Open this post in threaded view
|

Is deltaQuery mandatory ?

A. Lotfi
In reply to this post by Chris Hostetter-3
Is deltaQuery mandatory in data-config.xml ?

I did it like this :
<entity name="residential" query="select * from tsunami.consumer_data_01 where state='MA' and  rownum <= 5000"
                deltaQuery="select  LEMSMATCHCODE, STREETNAME from residential where last_modified > '${dataimporter.last_index_time}'">
 
Then my manager come and said we don't need it, this is only for incremental.
I took off the line that start with deltaQuery, now in :

http://localhost:8983/solr/#/db/dataimport//dataimport


entity is empty, when I click the button Exwcute, nothing happened,

thanks.
Reply | Threaded
Open this post in threaded view
|

Could not load config for solrconfig.xml

A. Lotfi
In reply to this post by Chris Hostetter-3
Hi,
solr setup in windows worked fine,
I tried to follow installing solr in unix, when I started tomcat I got this exxception :


SEVERE: Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoad
er.java:318)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader
.java:283)
        at org.apache.solr.core.Config.<init>(Config.java:103)
        at org.apache.solr.core.Config.<init>(Config.java:73)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:117)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:989)
        ... 11 more
Mar 28, 2013 1:39:43 PM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Unable to create core: collec
tion1
        at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:
1672)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1057)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.solr.common.SolrException: Could not load config for solrc
onfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        ... 10 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoad
er.java:318)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader
.java:283)
        at org.apache.solr.core.Config.<init>(Config.java:103)
        at org.apache.solr.core.Config.<init>(Config.java:73)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:117)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:989)
        ... 11 more

Mar 28, 2013 1:39:43 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: user.dir=/home/spbear/javaguys/apache-tomcat-7.0.39/bin
Mar 28, 2013 1:39:43 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Mar 28, 2013 1:39:43 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/spbear/javaguys/apache-tomcat-7.
INFO: Registering Log Listener
Mar 28, 2013 1:39:42 PM org.apache.solr.core.CoreContainer create
INFO: Creating SolrCore 'collection1' using instanceDir: /home/javaguys/solr-hom
e/collection1
Mar 28, 2013 1:39:42 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: new SolrResourceLoader for directory: '/home/javaguys/solr-home/collection
1/'
Mar 28, 2013 1:39:43 PM org.apache.solr.core.CoreContainer recordAndThrow
SEVERE: Unable to create core: collection1
org.apache.solr.common.SolrException: Could not load config for solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java
:991)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1051)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:634)
        at org.apache.solr.core.CoreContainer$3.call(CoreContainer.java:629)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)

 Your help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Could not load config for solrconfig.xml

Gora Mohanty-3
On 29 March 2013 00:19, A. Lotfi <[hidden email]> wrote:
> Hi,
> solr setup in windows worked fine,
> I tried to follow installing solr in unix, when I started tomcat I got this exxception :
[...]

Seems it cannot find solrconfig.xml. The relevant part from the logs is:
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin

Have you defined the solr/home property properly in your Solr
configuration file?

Regards,
Gora
Reply | Threaded
Open this post in threaded view
|

Re: Could not load config for solrconfig.xml

A. Lotfi
Thanks, 
my path to solr home was missing something, it's worlking, but no results, the same solr app with same configuration files worked in windows.
 
Abdel


________________________________
 From: Gora Mohanty <[hidden email]>
To: [hidden email]; A. Lotfi <[hidden email]>
Cc: "[hidden email]" <[hidden email]>
Sent: Thursday, March 28, 2013 3:22 PM
Subject: Re: Could not load config for solrconfig.xml
 
On 29 March 2013 00:19, A. Lotfi <[hidden email]> wrote:
> Hi,
> solr setup in windows worked fine,
> I tried to follow installing solr in unix, when I started tomcat I got this exxception :
[...]

Seems it cannot find solrconfig.xml. The relevant part from the logs is:
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpat
h or '/home/javaguys/solr-home/collection1/conf/', cwd=/home/spbear/javaguys/apa
che-tomcat-7.0.39/bin

Have you defined the solr/home property properly in your Solr
configuration file?

Regards,
Gora