I have a multicore setup for solr, the directory structure of which goes like
-multicore
|-core0
|--conf
|---schema.xml
|---solrconfig.xml
|---stopwords
|---synonyms
|-core1
|--conf
|---schema.xml
|---solrconfig.xml
|---stopwords
|---synonyms
Both of these cores essentially use the same stop words and synonyms file. Is there a way, both these files could be located at a common place and both the cores read it from there?
According to the CoreAdmin documentation, you can
specify properties in solr.xml which can be used in the solrconfig.xml and schema.xml files.
So as an example you could create something similar to the following:
<solr persistent="true" sharedLib="lib">
<property name="synonymns" value="<your path here>/synonyms.txt" />
<property name="stopwords" value="<your path here>/stopwords.txt" />
<cores adminPath="/admin/cores">
<core name="core0" instanceDir="core0"/>
<core name="core1" instanceDir="core1" />
</cores>
</solr>
Hopefully this should get you started, you will obviously want/need to modify the solr.xml settings to meet your specific needs. Also there are a few other options for how the properties can be defined and the use of defaults. Please refer to the documentation for more details.
Not sure if there is any elegant way with the latest releases.
You can check using the absolute path of the stopwords file.
We have just created a symbolic link to a common shared files which are updated avoiding duplicates.
Related
I'm trying spring-integration-zip - useful stuff - and was wondering if it (somehow) can also uzip .gz files apart from zip ones?
Moreover, I wanted to change workDirectory ("java.io.tmpdir") for unzip transformer - is there a way to change UnZipTransformer class in xml config, I do not see such possibility or maybe I'm missing something (I know I can use Java Config) - as it is in case of int:splitter for example?
Hm. We don't expose work-directory into the XML configuration.
Please, raise a GH issue on the matter.
Meanwhile you can use:
<int:transformer>
<bean id="unZipTransformer" class="org.springframework.integration.zip.transformer.UnZipTransformer">
<property name="workDirectory" value="D:\tmp"/>
</bean>
</int:transformer>
And no we don't support GZIP format for (un)compression.
The project has been built on top of zt-zip library. So, this Spring Integration Zip extension really provides functionality only for ZIP archives.
Feel free to fill out an issue on the matter as well.
I'm trying to create a Resources.pri file so that Windows 10 knows which images to use for my start tile on different resolutions. I'm following step 6 of MSDN's documentation linked below:
https://msdn.microsoft.com/en-us/library/windows/apps/dn393983.aspx#Specify_images_for_scaling__localization__and_high_contrast
I have all of my logo images labeled according to their scale. These are their names in my Assets folder:
70x70Logo.scale-80.png
70x70Logo.scale-100.png
70x70Logo.scale-140.png
70x70Logo.scale-180.png
150x150Logo.scale-80.png
150x150Logo.scale-100.png
150x150Logo.scale-140.png
150x150Logo.scale-180.png
When I use makepri.exe manually, it creates three Resources.pri files instead of just one with all of the scaling information I want in it. These are the files generated:
Resources.pri
Resources.scale-140.pri
Resources.scale-180.pri
Resources.pri has information for the 80% and 100% scales, but the other two files contain the information for the 140% and 180% scales. Any idea why the larger scales are being separated out into separate files? I've included below my TestAppConfig.xml file and the commands I'm using the generate the files.
TestAppConfig.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources targetOsVersion="10.0.0" majorVersion="1">
<packaging>
<autoResourcePackage qualifier="Language"/>
<autoResourcePackage qualifier="Scale"/>
<autoResourcePackage qualifier="DXFeatureLevel"/>
</packaging>
<index root="\" startIndexAt="\">
<default>
<qualifier name="Language" value="en-US"/>
<qualifier name="scale" value="100"/>
</default>
<indexer-config type="folder" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="."/>
<indexer-config type="resw" convertDotsToSlashes="true" initialPath=""/>
<indexer-config type="resjson" initialPath=""/>
<indexer-config type="PRI"/>
</index>
<!--<index startIndexAt="Start Index Here" root="Root Here">-->
<!-- <indexer-config type="resfiles" qualifierDelimiter="."/>-->
<!-- <indexer-config type="priinfo" emitStrings="true" emitPaths="true" emitEmbeddedData="true"/>-->
<!--</index>-->
</resources>
Command to create TestAppConfig.xml
"C:\Program Files (x86)\Windows Kits\10\bin\x86\makepri.exe" createconfig /cf %USERPROFILE%\Documents\TestAppConfig.xml /dq lang-en-US_scale-100_contrast-high /pv 10.0.0
Command to create Resources.pri
"C:\Program Files (x86)\Windows Kits\10\bin\x86\makepri.exe" new /pr %USERPROFILE%\Documents\CreateResources /cf %USERPROFILE%\Documents\TestAppConfig.xml /in TestApp /of %USERPROFILE%\Documents\CreateResources\Resources.pri
Any insight into this is greatly appreciated! Let me know if I can provide and further details.
I ended up finding a solution, though I'm exactly sure why it worked/was required to create just one Resources.pri file. I found that setting the default language of all of the images allowed makepri.exe to add all of the image scales as resouces candidates to one Resources.pri file. For example, I found this file structure worked:
\Assets
\en-US
70x70Logo.scale-80.png
70x70Logo.scale-100.png
70x70Logo.scale-140.png
70x70Logo.scale-180.png
150x150Logo.scale-80.png
150x150Logo.scale-100.png
150x150Logo.scale-140.png
150x150Logo.scale-180.png
I was clued in by this snippet of documentation:
Note We recommend that you mark the default language on string resource files (such as en-US\resources.resw) and the default scale on images (such as logo.scale-100.png), even if these files will not be localized nor multiple resolution images provided
https://msdn.microsoft.com/en-us/library/windows/apps/hh965372.aspx
Go figure.
I hope others find this helpful. If anyone has anymore insight on why makepri.exe works this way, I'd be curious to know more.
I've just encountered this with languages rather than images, but removing this block from the auto-generated makepri config fixed it for me:
<packaging>
<autoResourcePackage qualifier="Language"/>
<autoResourcePackage qualifier="Scale"/>
<autoResourcePackage qualifier="DXFeatureLevel"/>
</packaging>
I have a list of files for which I need to preserve the permissions during the ant task. I don have to preserve permssions for the rest of the files within 'src' directory. I realized that the only way to do this is using tarfileset's filemode attribute. Currently I am excluding the list of files in the first tarfileset and including them the second time with the permissions (to avoid duplicate files with different permssions) as given below:
<tar basedir="src" destfile="myzip.tar.gz" compression="gzip">
<tarfileset dir="com/foo/bar">
<exclude name="com/foo/bar/script1.sh"/>
<exclude name="com/foo/bar/script2.sh"/>
</tarfileset>
<tarfileset dir="com/foo/bar" filemode="755">
<include name="com/foo/bar/script1.sh"/>
<include name="com/foo/bar/script2.sh"/>
</tarfileset>
</tar>
I have to first exclude all the files and then again include them with the permissions which seems kind of redundant. Is this approach correct or is there a better way by which I can preserve the permissions of the list of files.
Note: I don't have just 2 files to for which I need to preserve the permissions. The list is quite big.
Any help is appreciated. Thanks in advance.
Regarding the scriptProcessor in the handlers section of IIS's web.config, are there any % symbols apart from %s (which seems to represent the requested filename)? For example, is %a a recognised macro/symbol? If there are others besides %s, where are they described?
Your question is a bit unclear, so I had to make a number of assumptions in order to answer it. Please let me know if I got anything wrong.
From the documentation:
Script Processor
Optional string attribute.
Specifies the physical path of the ISAPI extension .dll file or Common Gateway Interface (CGI) .exe file that processes the request.
The scriptProcessor attribute is required only for script map handler mappings. When you map a handler to an ISAPI extension, you must specify ISAPIModule for the modules attribute. When you map a handler to a CGI file, you must specify CGIModule for the modules attribute.
From the documentation, we don't see any mention of format strings at all. If there were format strings, what would you replace them with? There's no clear answer based on the XML. Perhaps you're mistaking an environment variable for a format string. Or your particular configuration setup has some post processing that's ran on it before it's pushed live.
If we are actually talking about environment variables, then you can view them by issuing Win+Break to bring up system settings, go to advanced, then open up environment variables. You may also define your own. To use any environment variable you can use %variablename% as you would in a standard .bat file.
EDIT: Upon greater research, I've found the following. %s will give you the script name, then %s again will give you the parameters foo=bar. This feature isn't advertised (that I can find) in any official IIS documentation. I strongly suspect that it's considered a deprecated feature. And they're pushing hard to make ISAPI the norm.
Because of how it's structured (ie like a standard format string) I suspect that trying other common format strings (%d %c %f) might yield you something interesting, but probably not. It looks like this was a very specific solution to a very specific problem.
It's not strictly related to your question but I post these 2 links as they are in some way connected and could be useful.
I've found how to use "#" and "$" to transform Web.Config, but I've found nothing on "%" that's not strictly related to environment variables.
First link: "#"
This first link explains the use of xdt:Transform and xdt:Locator attributes that you can use in Web.config transform files:
http://msdn.microsoft.com/en-us/library/dd465326.aspx
This example is an interesting use of Web.Config transformation using Conditions with "#":
<configuration xmlns:xdt="...">
<connectionStrings>
<add name="AWLT" connectionString="newstring"
providerName="newprovider"
xdt:Transform="Replace"
xdt:Locator="Condition(#name='oldname'
or #providerName='oldprovider')" />
</connectionStrings>
</configuration>
Second link: "$"
This second link shows how to use "$" to transform Web.Config avoiding the boring procedure to manually comment/uncomment Web.Config parts when deploying or testing in different servers:
http://andrewtwest.com/2010/02/25/using-web-config-transformations-in-web-site-projects/
An extract of the link, showing how to use MSBuild to transform Web.Config files starting from a Web Application project file:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\</OutputPath>
</PropertyGroup>
I'm having problems simply configuring the server for CruiseControl.NET. I am using the source block that is given by ThoughtWorks to set it up, but I cannot seem to get it to be error-free. I am pretty new to all this and some sort of direction would be fantastic.
Does anyone use this combination?
Do you have a ccnet.config file I can look at?
This is what does not work for me:
<cruisecontrol>
<project name="test">
<sourcecontrol type="clearCase">
<exec>batch file</exec>
<viewPath>path_name</viewPath>
<branch>main</branch>
<autoGetSource>false</autoGetSource>
<useLabel>true</useLabel>
<useBaseline>false</useBaseline>
<projectVobName>vob_name</projectVobName>
<viewName>projecy_name</viewName>
<executable>cleartool.exe</executable>
<timeout>50000</timeout>
</sourcecontrol>
</project>
</cruisecontrol>
Thank you.
I have no direct experience with this kind of setup, but if you are using the <projectVobName> tag, that means:
you are declaring a pvob (project vob used only in UCM to store project, stream, activities and components, all UCM data)
your view (with the root directory referenced in <viewPath>) must be an UCM view.
All the other path elements (like 'executable') should reference an absolute path (and not just "cleartool.exe")