Default core name in solr 1.4.1 - solr

I cannot set up default core in solr 1.4.1
<cores adminPath="/admin/cores" defaultCoreName="core0">
It doesn't work. The server starts as usual and works but doesn't allow making requests without core name. I went through their release notes and couldn't find when they started supporting this parameter. Does solr 1.4.1 support it? What are the other options?
UPD: The whole solr configs looks this way
<solr persistent="true">
<cores adminPath="/admin/cores" defaultCoreName="core0">
<core name="core0" instanceDir="./core0" />
<core name="core1" instanceDir="./core1" />
</cores>
</solr>
How I check:
1) Check without core(returns HTTP 400 now, "missing solr core name in path")
http://127.0.0.1:8080/solr/select?q=test&version=2.2&start=0&rows=10&indent=on
2) Check with core(response is correct) http://127.0.0.1:8080/solr/core0/select?q=test&version=2.2&start=0&rows=10&indent=on

The answer is No. DefaultCoreName is not supported in solr 1.4.1
I installed solr 3.5 and set up multicore environment, after specifying defaultCoreName I was able to perform the following two requests and the response was the same
http://127.0.0.1:8080/solr/select/?q=solr&version=2.2&start=0&rows=10&indent=on
and
http://127.0.0.1:8080/solr/core0/select/?q=solr&version=2.2&start=0&rows=10&indent=on

Yes it supported in 1.4.
You can try by making it as persistant = true if you want to add more core by the using solr api for managing the core.
If you don't want the default core you can remove it from the xml.
You can have you solr.xml as below and try.
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true">
<cores adminPath="/admin/cores" defaultCoreName="collection1">
<core name="collection1" instanceDir="./"/>
</cores>
</solr>
another would be if add your own core by mentioning the data dir and insatance dir..
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true">
<cores adminPath="/admin/cores">
<core name="Test" instanceDir="/home/abhijit/Downloads/Solr/" dataDir="/home/abhijit/Downloads/Solr/Test/data"/>
</cores>
</solr>

Related

Integrating grobid with tika and solr

I'm using Solr to index journal articles. Using the out-of-the-box configuration, it indexed the text of the documents, but I'm looking to use Grobid to pull out the authors, title, affiliations, etc. I got grobid up and running as a service.
I added
<str name="tika.config">/path/to/tika-config.xml</str>
to the requestHandler for /update/extract in solrconfig.xml
The tika-config looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<properties>
<parsers>
<parser class="org.apache.tika.parser.journal.JournalParser">
<mime>application/pdf</mime>
</parser>
</parsers>
</properties>
I'm getting a ClassNotFound exception when I try to import a document, but can't figure out where to set the classpath to fix it.
As mentioned on the Solr user's list, the latest version of Solr (6.0.0) is using a version of Tika (1.7) that predates the addition of grobid (which came in in Tika 1.11) permalink. To follow the upgrade to Tika 1.13, see SOLR-8981

Ubuntu upgrade (14.04.3) and solr upgrade (5.3) breaks solr3/jetty setup

While upgrading our production server to ubuntu 14 the solr/jetty broke.
To fix i tried:
- upgraded java version to 8.
- upgraded solr to 5.3
My earlier config used .war files. realized that now its stopped supporting .war files, so now cannot use my earlier config.
This was the steps i used earlier:
copy the solr.war file from the downloaded and untarred solr to the webapps folder, and make jetty owner:
sudo cp ~/x/apache-solr-3.6.1/dist/apache-solr-3.6.1.war /usr/share/jetty/webapps/solr.war
sudo chown jetty:jetty /usr/share/jetty/webapps/solr.war
create a context file in JETTY_HOME/contexts (sudo vim /usr/share/jetty/contexts/solr.xml)
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<!-- Set the solr.solr.home system property -->
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Call name="setProperty" class="java.lang.System">
<Arg type="String">solr.solr.home</Arg>
<Arg type="String">/usr/share/solr</Arg>
</Call>
</Configure>
tell solr how many cores we have and what those are in SOLR_HOME (sudo vim /usr/share/solr/solr.xml):
<solr persistent="true" sharedLib="lib">
<cores adminPath="/admin/cores">
<core name="demo" instanceDir="demo" />
<core name="dev" instanceDir="dev" />
<core name="qa" instanceDir="qa" />
<core name="www" instanceDir="www" />
</cores>
</solr>
etc.
Don't want to use the solr instance that comes with rsolr (4), if i can help it. But can't find corresponding info for solr 5.3
Running rails 3.2.21. and solr_sunspot gem 2.2.0
Thanks in advance!

My Solr Core1 (mutlicore) is not working?

I am trying for multicores somehow i am able to run my core0 but core1 is not finding. 404 err0r is there can any buddy tell me what is the right configuration in solr.xml.
I am preferring sorl wiki core admin help.
Thanks!
As it is described Solr Wiki, solr.xml should look like :
<solr persistent="true" sharedLib="lib">
<cores adminPath="/admin/cores">
<core name="core0" instanceDir="core0" />
<core name="core1" instanceDir="core1" />
</cores>
</solr>
And your solr directory should be like :
-solr
-core0
+conf
+data
-core1
+conf
+data
+lib
solr.xml
Also run create core for adding new cores. The command for creating core is :
http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&instanceDir=path_to_instance_directory&config=config_file_name.xml&schema=schem_file_name.xml&dataDir=data
You should give more details about your problem, in order to get detailed answer.

Wicket encoding issue on Google App Engine

I am a google app engine newbie.
I have an encoding issue with a wicket application in GAE.
(see http://ristorante-lastoria.appspot.com/wicket/home )
My IDE is configured to save the HTML template files in UTF-8.
I ve printed out the default file.encoding used by GAE JVM and it's ASCII.
I 've tried to set the following parameters in the appengine-web.xml.
<system-properties>
<property name="file.encoding" value="UTF-8" />
</system-properties>
<env-variables>
<env-var name="DEFAULT_ENCODING" value="UTF-8" />
<env-var name="APP_ENCODING" value="UTF-8" />
</env-variables>
I ve tried to set the flag --compile-encoding=UTF-8 when uploading the war content to the server.
At the build level(using maven), I tried to escape the unicode characters in the build using the native2ascii tool.
No luck so far :-(
Wicket version: 1.4.17
TIA
Add a xml declaration wirh encoding to all your templates:
<?xml version="1.0" encoding="UTF-8" ?>

Getting "missing core name in path" when trying to access Solr admin installed on Glassfish

I've installed Solr 3.1 on Glassfish, and that part passed smoothly, as when I visit<host>:<port>/solr, I get that "Welcome to Solr!" page, along with "Solr Admin" link.
Problems start when I try to opet admin panel, I get "HTTP Status 404 - missing core name in path". I have no clue why is that happening. Previously, I've been testing that default Solr example (single core) at localhost, but using Jetty, shipped with Solr release in form of that start.jar.
I've set system property solr.solr.home to point to the folder where solr.xml and conf folder is located, and here's the content of mentioned solr.xml:
<solr persistent="false"
<cores adminPath="/admin/cores" defaultCoreName="collection1">
<core name="collection1" instanceDir="." />
</cores>
</solr>
As you can see, just simple single core setup.
Any idea?
Thanks in advance
<solr persistent="false"
<cores adminPath="/admin/cores" defaultCoreName="collection1">
<core name="collection1" instanceDir="collection1" />
</cores>
</solr>
and a directory structure of:
collection1 (containing dirs, conf and data)
solr.xml
is the proper way to do it.

Resources