Skip to content

Commit

Permalink
Add Solr config and schema for Datastax Enterprise features
Browse files Browse the repository at this point in the history
  • Loading branch information
doanduyhai committed May 24, 2015
1 parent 92b904a commit 9a9d676
Show file tree
Hide file tree
Showing 3 changed files with 1,499 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/main/solr_config/albums_schema.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?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.
-->
<schema name="albums" version="1.5">
<types>
<fieldType name="TrieIntField" class="org.apache.solr.schema.TrieIntField"/>
<fieldType name="TrieFloatField" class="org.apache.solr.schema.TrieFloatField"/>
<fieldType name="string" class="solr.StrField"/>
<fieldType name="text" class="solr.TextField">
<analyzer><tokenizer class="solr.StandardTokenizerFactory"/></analyzer>
</fieldType>
</types>
<fields>
<!--
docValues="true" is useful for fields that are sorted or faceted on;
Less heap memory is used, facets can be faster, and query time
join can be faster.
Note: Text fields should not have docValue=true.
-->
<field name="title" type="text" indexed="true" />
<field name="country" type="string" indexed="true" />
<field name="performer" type="text" indexed="true" />
<field name="status" type="string" indexed="true"/>
<field name="year" type="TrieIntField" indexed="true"/>
</fields>

<defaultSearchField>title</defaultSearchField>
<uniqueKey>title</uniqueKey>

</schema>
50 changes: 50 additions & 0 deletions src/main/solr_config/performers_schema.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?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.
-->
<schema name="performers" version="1.5">
<types>
<fieldType name="TrieIntField" class="org.apache.solr.schema.TrieIntField"/>
<fieldType name="TrieFloatField" class="org.apache.solr.schema.TrieFloatField"/>
<fieldType name="string" class="solr.StrField"/>
<fieldType name="text" class="solr.TextField">
<analyzer><tokenizer class="solr.StandardTokenizerFactory"/></analyzer>
</fieldType>
<fieldType name="textcollection" class="solr.TextField" multiValued="true">
<analyzer><tokenizer class="solr.StandardTokenizerFactory"/></analyzer>
</fieldType>
</types>
<fields>
<!--
docValues="true" is useful for fields that are sorted or faceted on;
Less heap memory is used, facets can be faster, and query time
join can be faster.
Note: Text fields should not have docValue=true.
-->
<field name="name" type="text" indexed="true" />
<field name="country" type="string" indexed="true" />
<field name="born" type="text" indexed="true" />
<field name="died" type="text" indexed="true"/>
<field name="gender" type="string" indexed="true"/>
<field name="type" type="string" indexed="true"/>
<field name="styles" type="textcollection" indexed="true" />
</fields>

<defaultSearchField>name</defaultSearchField>
<uniqueKey>name</uniqueKey>

</schema>
Loading

0 comments on commit 9a9d676

Please sign in to comment.