JR Utily

versioned SolR config files !

<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- If this file is found in the config directory, it will only be
loaded once at startup. If it is found in Solr's data
directory, it will be re-loaded every commit.
See http://wiki.apache.org/solr/QueryElevationComponent for more info
-->
<elevate>
<!-- Query elevation examples
<query text="foo bar">
<doc id="1" />
<doc id="2" />
<doc id="3" />
</query>
for use with techproducts example
<query text="ipod">
<doc id="MA147LL/A" /> put the actual ipod at the top
<doc id="IW-02" exclude="true" /> exclude this cable
</query>
-->
</elevate>
<schema name="account" version="1.5"><!-- Confirmer choix version-->
<fieldType name="int" class="solr.TrieIntField"/>
<fieldType name="long" class="solr.TrieLongField"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true" />
<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="tdates" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0"/>
<fieldType name="tlongs" class="solr.TrieLongField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tdoubles" class="solr.TrieDoubleField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="ICUtext" class="solr.TextField">
<analyzer type="index">
<charFilter class="solr.HTMLStripCharFilterFactory"/>
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="namestr" class="solr.StrField"/>
<field name="presentation" type="ICUtext" indexed="true" stored="true" multiValued="false" required="false"/>
<field name="userId" type="int" indexed="true" multiValued="false" required="true"/>
<field name="_version_" type="long" indexed="true" multiValued="false" required="true"/>
<field name="_text_" type="ICUtext" indexed="true" multiValued="true" required="true"/>
<uniqueKey>userId</uniqueKey>
<copyField source="presentation" dest="_text_" />
</schema>
This diff is collapsed. Click to expand it.
#!/bin/sh
~solr/solr/bin/solr create -c publishers -d publishers
~solr/solr/bin/solr create -c accounts -d accounts
\ No newline at end of file
#!/bin/sh
~solr/solr/bin/solr delete -c publishers
~solr/solr/bin/solr delete -c accounts
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- If this file is found in the config directory, it will only be
loaded once at startup. If it is found in Solr's data
directory, it will be re-loaded every commit.
See http://wiki.apache.org/solr/QueryElevationComponent for more info
-->
<elevate>
<!-- Query elevation examples
<query text="foo bar">
<doc id="1" />
<doc id="2" />
<doc id="3" />
</query>
for use with techproducts example
<query text="ipod">
<doc id="MA147LL/A" /> put the actual ipod at the top
<doc id="IW-02" exclude="true" /> exclude this cable
</query>
-->
</elevate>
<schema name="publisher" version="1.5"><!-- Confirmer choix version-->
<fieldType name="int" class="solr.TrieIntField"/>
<fieldType name="long" class="solr.TrieLongField"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true" />
<fieldType name="booleans" class="solr.BoolField" sortMissingLast="true"/>
<fieldType name="tdates" class="solr.TrieDateField" docValues="true" precisionStep="6" positionIncrementGap="0"/>
<fieldType name="tlongs" class="solr.TrieLongField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="tdoubles" class="solr.TrieDoubleField" docValues="true" precisionStep="8" positionIncrementGap="0"/>
<fieldType name="ICUtext" class="solr.TextField">
<analyzer type="index">
<charFilter class="solr.HTMLStripCharFilterFactory"/>
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="solr.ICUFoldingFilterFactory"/>
</analyzer>
</fieldType>
<fieldType name="namestr" class="solr.StrField"/>
<!-- Collation Unicode difficile à faire fonctionner
<fieldType name="textICUC" class="solr.ICUCollationField" locale="fr"/>
-->
<!-- CollationField ne supporte pas un analyzer
-->
<fieldType name="textColl" class="solr.CollationField" language="fr"/>
<!--
-->
<field name="publisherName" type="ICUtext" indexed="true" stored="true" multiValued="false" required="true"/>
<field name="publisherCountry" type="namestr" indexed="true" stored="true" multiValued="false" required="false"/>
<field name="publisherHistory" type="ICUtext" indexed="true" stored="true" multiValued="false" required="false"/>
<field name="publisherId" type="int" indexed="true" multiValued="false" required="true"/>
<field name="_version_" type="long" indexed="true" multiValued="false" required="true"/>
<field name="_text_" type="ICUtext" indexed="true" multiValued="true" required="true"/>
<uniqueKey>publisherId</uniqueKey>
<copyField source="publisherName" dest="_text_" />
<copyField source="publisherHistory" dest="_text_" />
</schema>
This diff is collapsed. Click to expand it.