Solr 5 restart losing cores - apache

Noob Solr question
I am trying to set up Solr, and to aid I have been using Apache Solr installer from bitnami.
This will install Solr 5.4.
I have gone and created a new core, and everything looks good. However when I restart solr, the core I have just created is lost.
I have not altered any configuration items from what is installed by Bitnami
I have been reading up about how Solr 5 is self discovering, and I am sure that everything is correct.
This is a copy of my solr.xml file from C:\Bitnami\solr-5.4.0-0\apache-solr\solr
<?xml version="1.0" encoding="UTF-8" ?>
<solr>
<solrcloud>
<str name="host">${host:}</str>
<int name="hostPort">${jetty.port:8983}</int>
<str name="hostContext">${hostContext:solr}</str>
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
<int name="zkClientTimeout">${zkClientTimeout:30000}</int>
<int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:600000}</int>
<int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:60000}</int>
</solrcloud>
<shardHandlerFactory name="shardHandlerFactory"
class="HttpShardHandlerFactory">
<int name="socketTimeout">${socketTimeout:600000}</int>
<int name="connTimeout">${connTimeout:60000}</int>
</shardHandlerFactory>
</solr>
And I have checked, and in the core folder I have created, there is a core.properties file in the the conf folder. This is the contents of the file
#Written by CorePropertiesLocator
#Tue Dec 22 10:37:24 UTC 2015
name=sitecore_analytics_index
config=solrconfig.xml
schema=schema.xml
dataDir=data
loadOnStartup=true
So I cannot understand why the core is not being discovered. Any help greatly appreciated
ps. I am doing this on Windows and not *nix

Related

Apache Solr 9.0 OCR of Image Saved As PDF

I've got solr 9.0 running with the a request handler set up for Tika per https://solr.apache.org/guide/solr/latest/indexing-guide/indexing-with-tika.html.
If I pass in a pdf document (that is, a text document that is stored as a PDF), I get the expected results of being able to query for the content of the document.
If, however, I pass in a pdf that is an image (it is a scanned page from a newsletter, then saved as a PDF), no OCR is taking place. I'm using solrj to communicate with the solr install.
I also tried indexing the PDF after it was exported as a PNG. This worked testing with locally running tika, but not with solr.
fun index(file: File) {
val urlString = "http://localhost:8983/solr/films"
val solr = HttpSolrClient.Builder(urlString).build()
solr.parser = XMLResponseParser()
val req = ContentStreamUpdateRequest("/update/extract")
// I've tried both "image/pdf" and "application/pdf"
req.addFile(file, "image/pdf")
req.setParam("literal.id", file.name);
req.setAction(ACTION.COMMIT, true, true)
val result = solr.request(req)
println("Result: $result")
}
solrconfig.xml
<requestHandler name="/update/extract"
startup="lazy"
class="solr.extraction.ExtractingRequestHandler" >
<lst name="defaults">
<str name="lowernames">true</str>
<str name="uprefix">ignored_</str>
<!-- capture link hrefs but ignore div attributes -->
<str name="captureAttr">true</str>
<str name="fmap.a">links</str>
<str name="fmap.content">_text_</str>
</lst>
</requestHandler>
I decided to test in isolation with tika, so I started the docker container
docker run -it \
--name tika-server-ocr \
-d \
-p 9998:9998 \
apache/tika:1.24-full
If I passed in the file as a PDF, it did not work:
curl -T "285 October-5.pdf" http://localhost:9998/tika
If I pass in an exported png from the PDF, it does work:
curl -T "285 October-5 copy.png" http://localhost:9998/tika
NEGOTIATING GARRY'S ANCHORAGE
Garry's Anchorage is a popular rest spot on the western
I'm guessing there is a bit of config or perhaps a parameter I need to send in to solr during the extraction?

light.exe : error LGHT0199 : The WixLocalization element has an incorrect namespace of 'WixLocalization'

When I run the below command from the command line for the WIx installer after migrated from version 2.0 to 4.0:
E:\Source\TestProgram\builder>ant -v -f Build.xml -Dlabel =.001 install
I am getting the below error:
[exec] light.exe : error LGHT0199 : The WixLocalization element has an
incorrect namespace of 'WixLocalization'. Please make the
WixLocalization element look like the following: .
[ant] Exiting E:\Source\TestProgram1.0.1English_installer.xml.
I want to know the root cause of the error?
I checked "TestProgram1.0.1English_Installer.wxs" file for "WixLocalization" but didn't find any thing.
Pleas help me to resolve the issue.
UPDATE: wixlibs - another feature I have not used.
Localizing Extensions - that wixlib is probably a localization file.
What are .wixlibs and why would you use them?
Create binary .wixlib.
Bob knows everything about this, but let me chip in with a question in case the problem is something else. Just to verify, can you check all *.wxl files (localization files) in the project in question? Just to make sure the schema specified is according to what version 4 expects?:
WiX 4:
English.wxl:
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl">
<String Id="YOURLOCID">Your localized string</String>
</WixLocalization>
WiX 3:
English.wxl:
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="YOURLOCID">Your localized string</String>
</WixLocalization>
Suggestions:
So maybe create a localization file (*.wxl) if it is missing for WiX 4. Either in Visual Studio or slipstream it into your batch build script.
If there is a *.wxl there, maybe update the schema to <WixLocalization Culture="en-us" xmlns="http://wixtoolset.org/schemas/v4/wxl">.
For command lines, please see this: How To: Build a Localized Version of Your Installer.
You're using an Ant task that doesn't support WiX v4. Stick with WiX v3 (the latest supported release).

'sharedLib' in solr.xml not affecting after upgrading from solr 4.7 to solr 5.5.5

I am trying to upgrade solr 4.7 to solr 5.5.5.
In solr 4.7 solr.xml contained <str name="sharedLib">common</str> so configuration files such as solrconfig.xml loaded from the path '$SOLR_HOME/solr/common/conf' instead loading this file from each core.
Now, after upgrading to solr 5.5.5, I put the same 'sharedLib' but after starting solr I see errors in the UI for each core:
mycore_1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core mycore_1: Error loading solr config from ($SOLR_HOME)/solr/mycore_1/conf/solrconfig.xml
mycore_2: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core mycore_2: Error loading solr config from ($SOLR_HOME)/solr/mycore_2/conf/solrconfig.xml
remote_shared_instance: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core remote_shared_instance: Error loading solr config from ($SOLR_HOME)/solr/remote_shared_instance/conf/solrconfig.xml
Seems that it tried to search for the configuration files in the core's folders instead in the shared folder.
solr.xml placed in the right folder ($SOLR_HOME) because when deleting this file I get the message: 'olr home directory $SOLR_HOME/solr must contain a solr.xml file!' when starting solr.
I start solr from $SOLR_HOME which is different from the solr installation folder.
This is how the 'solr' section in solr.xml file looks:
<solr>
<solrcloud>
<str name="host">${host:}</str>
<int name="hostPort">${jetty.port:8983}</int>
<str name="hostContext">${hostContext:solr}</str>
<int name="zkClientTimeout">${zkClientTimeout:30000}</int>
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
</solrcloud>
<shardHandlerFactory name="shardHandlerFactory"
class="HttpShardHandlerFactory">
<int name="socketTimeout">${socketTimeout:0}</int>
<int name="connTimeout">${connTimeout:0}</int>
</shardHandlerFactory>
<str name="sharedLib">common</str>
</solr>
I also tried using configsets - I created a new folder under $SOLR_HOME 'solr/solr/configsets/common/conf' with cond files but how can I tell solr to refer to this folder? NOTE that the original 'configsets' folder is under solr installation folder 'solr-5.5.5/server/solr/configsets' and not under $SOLR_HOME.
Have I missed something?
Thanks!
Mike

apache solr 6 multiple dataimporthandler

I want to index from two different databases. Therefore I make two data-config.xml files with different names.
I integrate in solrconfig.xml file two requestHandler with DataimportHandler.
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">  
<lst name="defaults">
<str name="config">data-config-847.xml</str>
</lst>
<requestHandler name="/dataimport857" class="org.apache.solr.handler.dataimport.DataImportHandler">  
<lst name="defaults">
<str name="config">data-config-857.xml</str>
</lst>
But it does not function. I did the same configuration in solr 4.7, it function without problem. What ist different between solr 4.7 and solr 6.0? Or how it function?
It is probably SOLR-8993 affecting new Admin UI.
Workarounds:
Use legacy Admin UI, accessible through a link on the top of the screen
Pass config value as a URL parameter invoking DIH URL directly and not via Admin UI. The defaults section is just that - defaults that can be overridden with URL parameters.

Usage of startscript.xml in weblogic to generate sh files during domain creation process

I used weblogic for my learning purpose and i have read in weblogic documentation that using startscript.xml one can update modify sh and cmd files and place in domains root directory during the domain creation process.
For example using below snipped in startscript.xml i can update domainEnv.sh to set required GC arguments
<?xml version="1.0" encoding="UTF-8" ?>
<scripts>
<script type="ext" version="3" path="bin" name="setDomainEnv">
<blockinsert name="section_marker_30">
<setenv name="JAVA_OPTIONS" scope="global">
<value preserve="true">%JAVA_OPTIONS%
'-Xloggc:${DOMAIN_HOME}/servers/${SERVER_NAME}/logs/gc_${SERVER_NAME}.lg -XX:+PrintGCTimeStamps -XX:+PrintGCDetails
-XX:+DisableExplicitGC')
</value>
</setenv>
</blockinsert>
</script>
</scripts>
The above snippet works and i can see the JAVA_OPTIONS getting updated in setDomainenv.sh but what i did not understand is the significance of name=section_marker_30.I tried browsing oracle documentations but there seems to be no documentation reg the same.Can any one help me in understanding this and put me in right direction?
Thanks
VishwanathB