My Solr Core1 (mutlicore) is not working? - solr

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.

Related

Flink log files on Emr

I have my Flink jar running in Emr. I have logback.xml set to /mnt/var/flink.log as the path for it when it is running on Emr. I can only see the the logs which are formed by the Emr while running the jar but not mine. Please suggest me a way how to get the logs which i have defined in the programs which is running as Flink jar in Emr. I am unable to find proper solution to it. My logback.xml looks like:
<configuration>
<logger name="org.apache.flink.runtime.jobgraph.JobGraph" level="INFO" additivity="false">
<appender-ref ref="file" />
</logger>
<appender name="file" class="ch.qos.logback.core.FileAppender">
<file>/mnt/var/log/flink.log</file>
<append>false</append>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="file"/>
</root>
</configuration>
It could be related to FLINK-7990, as per this SO question. But note that you have to put the logback.xml file Flink's conf directory on the system from where you launch Flink. Side note - it's very helpful if you include the version of Flink when asking questions, as it's a fast-moving target.

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!

Default core name in solr 1.4.1

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>

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